/* ==========================================================================
   SGOE CECyTEQ - ISO 21001:2025 Custom Stylesheet
   ========================================================================== */

:root {
  font-size: 17px;
  --cecyteq-green: #009640;
  --cecyteq-green-dark: #007030;
  --cecyteq-orange: #F37021;
  --cecyteq-orange-dark: #C6530C;
  --cecyteq-blue: #0072CE;
  --cecyteq-blue-dark: #005299;
  --cecyteq-dark: #0F172A;
  --cecyteq-card-bg: #FFFFFF;
  --cecyteq-body-bg: #F8FAFC;
  --cecyteq-text: #1E293B;
  --cecyteq-muted: #64748B;
  --cecyteq-border: #E2E8F0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--cecyteq-body-bg);
  color: var(--cecyteq-text);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: var(--cecyteq-green);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cecyteq-blue);
}

/* Header & Navigation */
.header-glass {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--cecyteq-green);
}

/* La cabecera es fija; este espacio conserva el inicio real de cada página. */
#site-header { min-height: 4.65rem; }

/* Reserva el espacio de ambas filas de la cabecera móvil fija. */
@media (max-width: 1023px) {
  #site-header { min-height: calc(8.4rem + 4px); }
  .mobile-navigation .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    padding-inline: .25rem;
  }
}

.nav-link:focus-visible {
  outline: 3px solid #047857;
  outline-offset: 2px;
  border-radius: .25rem;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: var(--cecyteq-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hero Section */
.hero-gradient {
  background: linear-gradient(135deg, #0F172A 0%, #007030 55%, #005299 100%);
}

.philosophy-section { background: #f8fafc url('../assets/portal-fondo.webp') center / cover no-repeat; }
.philosophy-panel, .philosophy-policy-card { border: 1px solid rgba(203,213,225,.9); border-radius: 1rem; background: rgba(255,255,255,.9); box-shadow: 0 12px 28px rgba(15,23,42,.1); backdrop-filter: blur(8px); }
.philosophy-policy-card { display:flex; min-height:100%; flex-direction:column; padding:1.5rem; }
.philosophy-panel, .philosophy-policy-card { transition:transform 180ms ease, box-shadow 180ms ease; }
.philosophy-panel:hover, .philosophy-policy-card:hover { transform:translateY(-3px); box-shadow:0 16px 30px rgba(0,82,153,.18); }
@media (prefers-reduced-motion: reduce) {
  .philosophy-panel, .philosophy-policy-card { transition:none; }
  .philosophy-panel:hover, .philosophy-policy-card:hover { transform:none; }
}
.philosophy-policy-card:focus-visible { outline:3px solid #facc15; outline-offset:4px; }
.philosophy-action { display:inline-flex; align-items:center; gap:.45rem; color:var(--cecyteq-green-dark); font-size:.8rem; font-weight:800; }

.policy-card-glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.identity-panel {
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.2);
}

.objectives-panel {
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.2);
}

.objective-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.objective-card {
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--objective-accent) 42%, white);
  border-left: 3px solid var(--objective-accent);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.objective-card img {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 999px;
  object-fit: cover;
}

.objective-card b {
  color: var(--objective-accent);
  font-size: 1.22rem;
}

.objective-card:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--objective-accent) 8%, white);
  box-shadow: 0 8px 16px color-mix(in srgb, var(--objective-accent) 25%, transparent);
}

.objective-card:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.philosophy-objective-grid .objective-card span { opacity:.42; transition:opacity 180ms ease; }
.philosophy-objective-grid { grid-template-columns:1fr; }
.philosophy-objective-grid .objective-card:hover span { opacity:1; }
.objective-icon { width:48px; flex:none; color:var(--objective-accent); font-size:2rem; text-align:center; }

.objective-card-wide {
  grid-column: 1 / -1;
}

.identity-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.identity-card {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--identity-accent) 42%, white);
  border-bottom: 3px solid var(--identity-accent);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.identity-card img {
  width: min(76px, 82%);
  height: 76px;
  object-fit: contain;
}

.identity-card:hover {
  transform: translateY(-3px);
  background: color-mix(in srgb, var(--identity-accent) 8%, white);
  box-shadow: 0 10px 18px color-mix(in srgb, var(--identity-accent) 25%, transparent);
}

.identity-card:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.identity-modal-header {
  border-bottom: 4px solid var(--identity-accent, var(--cecyteq-green));
  background: color-mix(in srgb, var(--identity-accent, var(--cecyteq-green)) 9%, white);
}

.identity-modal-header img {
  width: 58px;
  height: 58px;
  flex: none;
  object-fit: contain;
}

.identity-modal-font-icon { width:58px; height:58px; flex:none; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:color-mix(in srgb, var(--identity-accent, var(--cecyteq-green)) 14%, white); color:var(--identity-accent, var(--cecyteq-green)); font-size:1.75rem; }

.identity-values-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.identity-values-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #dbe5df;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
}

.identity-values-list i {
  color: var(--cecyteq-green);
}

@media (max-width: 420px) {
  .identity-card {
    min-height: 104px;
  }

  .identity-card img {
    width: min(64px, 84%);
    height: 64px;
  }

  .identity-values-list {
    grid-template-columns: 1fr;
  }

  .objective-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) { .philosophy-objective-grid .objective-card span { opacity:1; } }

/* Macroproceso Cards */
.macro-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.macro-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(0, 150, 64, 0.2);
  border-color: rgba(0, 150, 64, 0.4);
}

/* Badge Styles */
.badge-code {
  background-color: rgba(0, 150, 64, 0.1);
  color: var(--cecyteq-green);
  border: 1px solid rgba(0, 150, 64, 0.25);
}

/* Sistema de tarjetas: una base ligera, acento semántico y elevación uniforme. */
.portal-card {
  --card-accent: var(--cecyteq-green);
  position: relative;
  border-color: color-mix(in srgb, var(--card-accent) 18%, #cbd5e1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-card::before {
  position: absolute;
  inset: 0.7rem auto 0.7rem 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--card-accent);
  content: '';
  opacity: 0.72;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-accent) 48%, #cbd5e1);
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--card-accent) 45%, rgba(15, 23, 42, 0.22));
}

.portal-card:focus-within {
  border-color: var(--card-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-accent) 18%, transparent), 0 12px 24px -12px rgba(15, 23, 42, 0.22);
}

.portal-card-quality { --card-accent: var(--cecyteq-green); }
.portal-card-strategic { --card-accent: var(--cecyteq-blue); }

/* Los lineamientos ya usan una cápsula de identidad: su contenedor no añade otra. */
.lineamiento-card {
  border-color: color-mix(in srgb, var(--lineamiento-accent, #009640) 22%, #cbd5e1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lineamiento-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--lineamiento-accent, #009640) 58%, #cbd5e1);
  box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--lineamiento-accent, #009640) 34%, transparent);
}

.lineamiento-card:focus-within {
  border-color: var(--lineamiento-accent, #009640);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lineamiento-accent, #009640) 16%, transparent), 0 12px 24px -14px color-mix(in srgb, var(--lineamiento-accent, #009640) 34%, transparent);
}

/* Subproceso Item */
.subproc-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.subproc-item:hover {
  background-color: #F0FDF4;
  border-left-color: var(--cecyteq-green);
  padding-left: 1rem;
}

/* Hierarchical process list */
.macro-accordion,
.subproc-accordion {
  border: 1px solid var(--cecyteq-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.macro-accordion {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.macro-accordion:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 50%, rgba(15, 23, 42, 0.25));
}

.macro-accordion[open] {
  border-color: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 45%, #e2e8f0);
}

.macro-accordion summary,
.subproc-accordion summary {
  list-style: none;
  cursor: pointer;
}

.macro-accordion summary::-webkit-details-marker,
.subproc-accordion summary::-webkit-details-marker {
  display: none;
}

.macro-accordion-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-left: 5px solid var(--macro-accent, var(--cecyteq-green));
  background: rgba(0, 150, 64, 0.06);
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 9%, #fff);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.macro-accordion-header:hover {
  background: rgba(0, 150, 64, 0.12);
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 14%, #fff);
}

.macro-accordion[open] > .macro-accordion-header {
  background: rgba(0, 150, 64, 0.15);
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 17%, #fff);
}

.macro-icon {
  width: 2.125rem;
  height: 2.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--macro-accent, var(--cecyteq-green));
  background: transparent;
  box-shadow: none;
  font-size: 1.68rem;
  flex-shrink: 0;
}

.macro-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.macro-code,
.subproc-code {
  width: fit-content;
  font: 700 0.68rem/1.2 'Inter', system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: var(--macro-accent, var(--cecyteq-green));
}

.subproc-code,
.doc-info-badge,
.pdi-status-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.045em;
}

.subproc-code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 64%, #0f172a);
}

.macro-title {
  color: var(--cecyteq-dark);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.macro-count,
.macro-local-count,
.doc-count {
  color: var(--cecyteq-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.macro-local-count {
  color: #64748b;
}

.accordion-chevron {
  color: #94a3b8;
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.macro-accordion[open] > .macro-accordion-header .accordion-chevron,
.subproc-accordion[open] > .subproc-row .accordion-chevron,
.lineamiento-documents[open] > summary .accordion-chevron {
  transform: rotate(180deg);
}

.macro-accordion-body {
  padding: 0 1.25rem 1.25rem 4.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.macro-summary {
  margin: 0 0 0.85rem;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
}

.subproc-list {
  display: grid;
  gap: 0;
}

.subproc-accordion {
  border: 0;
  border-radius: 0.7rem;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.subproc-accordion + .subproc-accordion {
  border-top: 1px solid color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 18%, #e2e8f0);
}

.subproc-accordion[open] {
  margin: 0.5rem 0;
  border: 1px solid color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 38%, #cbd5e1);
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 4%, #fff);
  box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 58%, rgba(15, 23, 42, 0.32));
  overflow: hidden;
}

.subproc-accordion[open] + .subproc-accordion {
  border-top-color: transparent;
}

.subproc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  transition: background-color 0.2s ease;
}

.subproc-row:hover {
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 6%, #fff);
}

.subproc-accordion[open] > .subproc-row {
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 9%, #fff);
}

/* Al desplegar formatos, el encabezado se integra visualmente al mismo card. */
.subproc-accordion[open] > .subproc-row .subproc-identity {
  border-color: transparent;
  background: transparent;
}

.subproc-accordion[open] > .doc-info-panel {
  border-top-color: transparent;
}

.subproc-identity {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.38rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(0, 150, 64, 0.3);
  border-color: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 42%, #cbd5e1);
  border-radius: 0.7rem;
  background: rgba(0, 150, 64, 0.1);
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 14%, #fff);
  color: var(--macro-accent, var(--cecyteq-green));
  line-height: 1;
}

.subproc-identity > i {
  color: var(--macro-accent, var(--cecyteq-green));
  font-size: 2.688rem;
}

.document-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid #a7f3d0;
  border-radius: 0.7rem;
  background: #ecfdf5;
  color: #047857;
  line-height: 1;
}

.document-identity > i {
  color: inherit;
  font-size: 3.36rem;
}

.document-identity-label {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: 700 0.68rem/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.045em;
  color: inherit;
}

.lineamiento-identity {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 0;
}

.lineamiento-card-header { gap: .75rem; }
.lineamiento-category { flex: 0 0 auto; max-width: 7.5rem; }

@media (max-width: 640px) {
  .lineamiento-card-header { flex-direction: column; align-items: flex-start; }
  .lineamiento-identity { flex: 0 1 auto; width: 100%; }
  .lineamiento-category { max-width: 100%; }
}

.lineamiento-pdf-action {
  cursor: pointer;
  font: inherit;
  text-align: left;
  outline: none;
}

.lineamiento-card .document-identity {
  border-color: color-mix(in srgb, var(--lineamiento-accent, #009640) 40%, #cbd5e1);
  background: color-mix(in srgb, var(--lineamiento-accent, #009640) 11%, #fff);
  color: var(--lineamiento-accent, #009640);
}

.lineamiento-card .lineamiento-documents {
  border-color: color-mix(in srgb, var(--lineamiento-accent, #009640) 24%, #d1fae5);
  background: color-mix(in srgb, var(--lineamiento-accent, #009640) 4%, #fff);
}

.lineamiento-card .lineamiento-documents summary { color: var(--lineamiento-accent, #047857); }

.lineamiento-identity-content,
.subproc-identity-content,
.normativity-identity-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.18rem;
}

.lineamiento-identity-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.normativity-identity {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.normativity-identity-name {
  overflow-wrap: anywhere;
  min-width: 0;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.subproc-name {
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 750;
}

.subproc-description {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.4;
}

.subproc-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.procedure-file-action,
.procedure-file-status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.procedure-file-action > i,
.procedure-file-status > i {
  font-size: 0.9rem;
}

.procedure-pdf-icon {
  color: #881337 !important;
}

.information-documents-icon {
  color: #0f172a !important;
}

.procedure-file-action:hover {
  background: rgba(0, 150, 64, 0.1);
  text-decoration: underline;
}

.procedure-view-action.is-active {
  background: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 14%, #fff);
  text-decoration: none;
}

.doc-info-panel {
  padding: 0.8rem 1rem 1rem;
  border-top: 2px solid rgba(0, 150, 64, 0.24);
  border-top-color: color-mix(in srgb, var(--macro-accent, var(--cecyteq-green)) 30%, #e2e8f0);
  background: #fff;
}

.lineamiento-documents {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #d1fae5;
  border-radius: 0.75rem;
  background: #f8fffb;
}

.lineamiento-documents summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  color: #047857;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  list-style: none;
}

.lineamiento-documents summary::-webkit-details-marker {
  display: none;
}

.lineamiento-documents-count {
  margin-left: auto;
  color: #64748b;
  font-weight: 700;
}

.lineamiento-documents .doc-info-panel {
  padding: 0.45rem 0.8rem 0.8rem;
  border-top-color: #a7f3d0;
}

.doc-info-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-info-item,
.doc-info-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.55rem 0.35rem;
  border-radius: 0;
  color: #475569;
  font-size: 0.72rem;
}

.doc-info-item {
  --doc-accent: #64748b;
  border-bottom: 1px solid #e2e8f0;
  border-bottom-color: color-mix(in srgb, var(--doc-accent) 18%, #e2e8f0);
  background: transparent;
}

.doc-info-item:last-child {
  border-bottom: 0;
}

.doc-info-item:hover {
  background: color-mix(in srgb, var(--doc-accent) 5%, #fff);
}

.doc-info-item .doc-info-link {
  flex: 1;
  color: #334155;
}

.doc-info-item .doc-info-icon {
  color: var(--doc-accent);
  font-size: 0.95rem;
}

.doc-info-item .doc-info-badge {
  color: var(--doc-accent);
  background: rgba(100, 116, 139, 0.1);
  background: color-mix(in srgb, var(--doc-accent) 12%, #fff);
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-color: color-mix(in srgb, var(--doc-accent) 30%, #e2e8f0);
  border-radius: 0.35rem;
  padding: 0.15rem 0.35rem;
}

.doc-type-pdf { --doc-accent: #881337; }
.doc-type-word { --doc-accent: #2563eb; }
.doc-type-excel { --doc-accent: #059669; }
.doc-type-powerpoint { --doc-accent: #ea580c; }
.doc-type-generic { --doc-accent: #64748b; }
.doc-type-pending {
  --doc-accent: #b45309;
  border-bottom-style: dashed;
  background: color-mix(in srgb, var(--doc-accent) 5%, #fff);
}

.doc-info-link:hover {
  background: rgba(240, 253, 244, 0.9);
  background: color-mix(in srgb, var(--doc-accent) 9%, #fff);
  color: #1e293b;
}

.doc-info-placeholder {
  color: #92400e;
}

.doc-info-badge {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Búsqueda fija: superficie translúcida legible sobre cualquier sección. */
.search-shell {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-shell .search-input {
  background: rgba(255, 255, 255, 0.78);
}

.search-empty-card {
  border: 1px solid #cbded2;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.search-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.3rem;
  height: 3.3rem;
  margin-bottom: 0.85rem;
  border-radius: 9999px;
  color: #007030;
  background: #e9f7ee;
  font-size: 1.25rem;
}

.search-empty-card h2 {
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.search-empty-card p {
  margin-top: 0.4rem;
  color: #64748b;
  font-size: 0.84rem;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.search-suggestions button {
  border: 1px solid #b7d9c1;
  border-radius: 9999px;
  padding: 0.4rem 0.65rem;
  color: #007030;
  background: #f0fbf3;
  font: 700 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.search-suggestions button:hover,
.search-suggestions button:focus-visible {
  border-color: #009640;
  background: #dcf7e6;
  transform: translateY(-1px);
}

.search-hit {
  padding: 0 0.12rem;
  border-radius: 0.2rem;
  background: #fef08a;
  color: #713f12;
}

.macro-accordion summary:focus-visible,
.subproc-accordion summary:focus-visible,
.procedure-file-action:focus-visible,
.doc-info-link:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .macro-accordion-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.85rem 0.9rem;
  }

  .macro-local-count {
    display: none;
  }

  .macro-accordion-body {
    padding: 0 0.9rem 0.9rem;
  }

  .subproc-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .subproc-row-actions {
    width: 100%;
    justify-content: space-between;
  }

}

@media (prefers-reduced-motion: reduce) {
  .macro-accordion-header,
  .accordion-chevron,
  .procedure-file-action {
    transition: none;
  }

}

/* Modal Animations */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease-out forwards;
}

.modal-content {
  animation: zoomIn 0.25s ease-out forwards;
  border: 1px solid rgba(0, 150, 64, 0.3);
}

.macro-hierarchy-modal {
  width: min(72rem, calc(100vw - 3rem));
  max-width: 72rem;
  max-height: calc(100vh - 3rem);
}

/* Dentro del modal el nombre tiene prioridad: los contadores pasan a una segunda línea. */
.macro-hierarchy-modal .macro-accordion-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  row-gap: 0.35rem;
}

.macro-hierarchy-modal .macro-heading {
  grid-column: 2;
  grid-row: 1;
}

.macro-hierarchy-modal .macro-count {
  grid-column: 2;
  grid-row: 2;
}

.macro-hierarchy-modal .macro-local-count {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
}

.macro-hierarchy-modal .macro-accordion-header > .accordion-chevron {
  grid-column: 3;
  grid-row: 1;
}

.macro-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, var(--macro-accent, #0072ce) 100%);
}

.macro-modal-code {
  display: block;
  margin-bottom: 0.2rem;
  color: rgba(255, 255, 255, 0.78);
  font: 700 0.68rem/1.2 'Inter', system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.macro-modal-icon {
  width: 3rem;
  height: 3rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.macro-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #f8fafc;
}

.macro-modal-body > .macro-accordion {
  box-shadow: none;
}

.macro-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  color: #64748b;
  font-size: 0.72rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 767px) {
  .macro-hierarchy-modal {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .macro-hierarchy-modal .macro-accordion-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .macro-hierarchy-modal .macro-local-count {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .macro-modal-header {
    padding: 1rem;
  }

  .macro-modal-body {
    max-height: 72vh;
    padding: 1rem;
  }

  .macro-modal-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.75rem 1rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Tab Active Styles */
.tab-btn.active {
  background-color: var(--cecyteq-green);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 150, 64, 0.3);
}

/* Search Bar Glow */
.search-input:focus {
  box-shadow: 0 0 0 4px rgba(0, 150, 64, 0.18);
  border-color: var(--cecyteq-green);
}

/* Pulsing Badge for Vigente */
.pulse-badge {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Interactive Quality Map Hotspots */
.manual-sgoe-section {
  padding: 2.25rem 0;
  background: linear-gradient(180deg, #f8fafc 0%, #edf7f1 100%);
}

.manual-sgoe-card {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid #bbdfcb;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.manual-sgoe-card:hover {
  transform: translateY(-4px);
  border-color: #7fbe95;
  box-shadow: 0 24px 46px -20px rgba(0, 112, 48, 0.32);
}

.manual-sgoe-preview {
  position: relative;
  display: block;
  min-height: 20rem;
  overflow: hidden;
  cursor: pointer;
  background: #e2e8f0;
  border: 0;
  padding: 0;
}

.manual-sgoe-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 20rem;
  object-fit: cover;
  object-position: center 38%;
  transition: transform 0.35s ease;
}

.manual-sgoe-preview-overlay {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 9999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.manual-sgoe-preview:hover .manual-sgoe-preview-image,
.manual-sgoe-preview:focus-visible .manual-sgoe-preview-image {
  transform: scale(1.035);
}

.manual-sgoe-preview:hover .manual-sgoe-preview-overlay,
.manual-sgoe-preview:focus-visible .manual-sgoe-preview-overlay {
  opacity: 1;
  transform: translateY(0);
}

.manual-sgoe-content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.manual-sgoe-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #007030;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-sgoe-content h2 {
  max-width: 34rem;
  margin: 0.75rem 0 0;
  color: #0f172a;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.15;
}

.manual-sgoe-content > p:not(.manual-sgoe-kicker) {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
}

.objectives-graphic {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.objectives-graphic img {
  margin-top: -8.3%;
  filter: brightness(1.04);
  mix-blend-mode: multiply;
}

.certification-references {
  margin-bottom: 1rem;
}

.certification-references-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.certification-reference-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cbded2;
  border-radius: 0.8rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.certification-reference-card:hover {
  border-color: #009640;
  box-shadow: 0 6px 16px rgba(0, 112, 48, 0.12);
  transform: translateY(-4px);
}

.certification-reference-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 9999px;
  color: #007030;
  background: #e9f7ee;
}

.certification-reference-logo {
  display: block;
  width: 8.4rem;
  height: 2.85rem;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
}

.certification-reference-iso-logo {
  display: block;
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.certification-reference-card span {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.certification-reference-card small {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
}

.certification-reference-card strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certification-reference-external {
  margin-left: auto;
  color: #64748b;
  font-size: 0.7rem;
}

@media (max-width: 767px) {
  .manual-sgoe-section {
    padding: 1.25rem 0;
  }

  .manual-sgoe-card {
    grid-template-columns: 1fr;
  }

  .manual-sgoe-preview,
  .manual-sgoe-preview-image {
    min-height: 15rem;
  }

  .manual-sgoe-preview-overlay {
    opacity: 1;
    transform: none;
  }

  .certification-references-grid {
    grid-template-columns: 1fr;
  }

  .certification-reference-logo {
    width: 7.5rem;
  }
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  user-select: none;
}

.map-hotspot {
  --map-accent: #009640;
  position: absolute;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  appearance: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-hotspot::after {
  position: absolute;
  inset: 18%;
  border: 2px solid var(--map-accent);
  border-radius: inherit;
  content: '';
  opacity: 0;
  pointer-events: none;
  animation: map-hotspot-pulse 3.4s ease-out var(--pulse-delay, 0s) infinite;
}

@keyframes map-hotspot-pulse {
  0% { transform: scale(0.68); opacity: 0.52; }
  68%, 100% { transform: scale(1.35); opacity: 0; }
}

.map-hotspot-circle {
  border-radius: 50%;
}

.map-hotspot-chevron {
  border-radius: 16px;
}

.map-hotspot-support {
  border-radius: 9999px;
}

.map-hotspot:hover {
  background: color-mix(in srgb, var(--map-accent) 25%, transparent);
  border-color: var(--map-accent);
  box-shadow: 0 0 25px color-mix(in srgb, var(--map-accent) 75%, transparent), inset 0 0 15px rgba(255, 255, 255, 0.4);
  transform: scale(1.12);
  z-index: 30;
}

.map-hotspot:hover::after,
.map-hotspot:focus-visible::after {
  animation-play-state: paused;
  opacity: 0;
}

.hotspot-label {
  position: absolute;
  z-index: 31;
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--map-accent);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--map-accent);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.hotspot-label-top {
  bottom: calc(100% + 0.55rem);
}

.hotspot-label-bottom {
  top: calc(100% + 0.55rem);
  transform: translateY(-6px);
}

.map-hotspot:hover .hotspot-label {
  opacity: 1;
  transform: translateY(0);
}

.map-hotspot:focus-visible .hotspot-label {
  opacity: 1;
  transform: translateY(0);
}

.map-chip {
  --map-accent: #009640;
  --map-ink: #fff;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--map-accent);
  border-radius: 0.65rem;
  background: var(--map-accent);
  color: var(--map-ink);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

@supports (color: color-mix(in srgb, #000 50%, #fff)) {
  .map-chip {
    border-color: color-mix(in srgb, var(--map-accent) 65%, #fff);
    background: color-mix(in srgb, var(--map-accent) 78%, #0f172a);
  }
}

.map-chip:hover {
  background: var(--map-accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

@supports (color: color-mix(in srgb, #000 50%, #fff)) {
  .map-chip:hover {
    background: color-mix(in srgb, var(--map-accent) 90%, #0f172a);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--map-accent) 45%, transparent);
  }
}

.map-chip-number {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.65rem;
}

/* En pantallas táctiles los nombres se consultan en el selector móvil.
   Los marcadores numerados permanecen visibles y conservan un objetivo mínimo de 44 px. */
@media (max-width: 767px) {
  .map-hotspot {
    min-width: 44px;
    min-height: 44px;
  }

  .map-hotspot::before {
    content: attr(data-number);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font: 700 0.72rem/1 'Inter', system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  }

  .map-hotspot .hotspot-label {
    display: none;
  }

  .map-chip {
    font-size: 0.66rem;
  }
}

.map-hotspot:focus-visible,
.map-chip:focus-visible,
.macro-card-action:focus-visible {
  outline: 3px solid #FBBF24;
  outline-offset: 3px;
}

.macro-card-action {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}

.pdf-modal-content {
  max-height: calc(100vh - 3rem);
  width: min(100%, 72rem) !important;
  max-width: 72rem !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.pdf-viewer-shell {
  min-height: min(72vh, 760px);
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.pdf-viewer {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: min(72vh, 760px);
  border: 0;
}

@media (max-width: 640px) {
  .pdf-viewer-shell,
  .pdf-viewer {
    min-height: 68vh;
    height: 68vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* Vistas independientes: encabezado de página y búsqueda global. */
.page-intro {
  padding: 3.75rem 0 3rem;
  background: linear-gradient(135deg, #effcf5 0%, #f8fafc 55%, #eef6ff 100%);
  border-bottom: 1px solid #dbe7df;
}

body[data-page] {
  background: #f8fafc url('../assets/portal-fondo.webp') center top / cover fixed no-repeat;
}

body[data-page] .page-intro {
  background: linear-gradient(135deg, rgb(239 252 245 / .64) 0%, rgb(248 250 252 / .68) 55%, rgb(238 246 255 / .64) 100%);
}

.page-kicker,
.section-kicker {
  color: #007030;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-intro h1 {
  margin-top: .5rem;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.page-intro p:not(.page-kicker) {
  max-width: 48rem;
  margin-top: .8rem;
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

.page-search {
  display: flex;
  align-items: center;
  gap: .7rem;
  max-width: 52rem;
  margin-top: 1.5rem;
  padding: .7rem 1rem;
  background: rgb(255 255 255 / .88);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  box-shadow: 0 8px 20px -16px rgb(15 23 42 / .55);
  backdrop-filter: blur(12px);
}

.page-search > i { color: #64748b; }
.page-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #0f172a; font-size: .92rem; }
.page-search:focus-within {
  outline: 3px solid #047857;
  outline-offset: 3px;
  border-color: #047857;
}
.page-search input { min-width: 0; min-height: 44px; }
.page-search input[type="search"]::-webkit-search-cancel-button,
.page-search input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.page-search a, .page-search button { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.page-search a:not(.hidden), .page-search button:not(.hidden) { display: inline-flex; }
.search-field-label { display: block; margin-top: 1rem; color: #334155; font-size: .85rem; font-weight: 700; }
.search-field-label + .page-search { margin-top: .5rem; }
.page-search a, .page-search button { color: #64748b; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.page-search button:hover { color: #047857; }
.search-feedback { margin-top: .65rem; color: #475569; font-size: .82rem; }
.search-section-title { margin-bottom: 1rem; color: #0f172a; font-size: 1.25rem; font-weight: 900; }
.search-empty-state { padding: 3rem 1.5rem; margin-bottom: 2.5rem; text-align: center; background: white; border: 1px solid #e2e8f0; border-radius: 1rem; }
.search-empty-state i { color: #94a3b8; font-size: 2rem; }.search-empty-state h2 { margin-top: .8rem; color: #1e293b; font-weight: 800; }.search-empty-state p { margin-top: .35rem; color: #64748b; font-size: .88rem; }
.nav-link[aria-current="page"] { color: #047857; }
.topic-pill { display: inline-flex; padding: .35rem .6rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .72rem; font-weight: 700; }
.action-button { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .8rem; border-radius: .7rem; font-size: .75rem; font-weight: 700; transition: background-color .2s, color .2s; }
.action-button-light { background: #fff; border: 1px solid #cbd5e1; color: #334155; }.action-button-light:hover { background: #f1f5f9; }
@media (max-width: 640px) { .page-intro { padding: 2.6rem 0 2.3rem; } .page-search a { display: none; } }

/* Filosofía: vista de consulta compacta para mostrar sus tres bloques sin desplazamiento inicial. */
body[data-page="filosofia"] .page-intro {
  padding: 1.8rem 0 1.5rem;
}

body[data-page="filosofia"] .page-intro h1 {
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

:is(body[data-page="filosofia"], body[data-page="catalogo"]) .objective-card {
  min-height: 54px;
  padding: .35rem .45rem;
  font-size: .82rem;
}

:is(body[data-page="filosofia"], body[data-page="catalogo"]) .objective-card b { font-size: 1rem; }
:is(body[data-page="filosofia"], body[data-page="catalogo"]) .objective-icon { width: 34px; font-size: 1.45rem; }
:is(body[data-page="filosofia"], body[data-page="catalogo"]) .identity-card { min-height: 86px; }
:is(body[data-page="filosofia"], body[data-page="catalogo"]) .philosophy-objective-grid .objective-card span { opacity: 1; }
:is(body[data-page="filosofia"], body[data-page="catalogo"]) .philosophy-objective-grid .objective-card[aria-disabled="true"] { cursor: default; }

body[data-page="manual"] .page-intro,
body[data-page="mapa"] .page-intro { display: none; }

:is(body[data-page="manual"], body[data-page="catalogo"]) .manual-sgoe-section { background: transparent; }

:is(body[data-page="mapa"], body[data-page="catalogo"]) #mapa-calidad {
  background: transparent;
  color: #0f172a;
  border: 0;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.quality-map-frame {
  position: relative;
  width: 90%;
  max-width: 864px;
  margin: -.55rem auto 0;
}

.quality-map-frame > img {
  display: block;
}

.map-hotspots-overlay {
  position: absolute;
  inset: 0;
}

body[data-page="procesos"] .page-intro > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, .9fr);
  column-gap: 2rem;
}

body[data-page="procesos"] .page-intro .page-search {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  margin-top: 0;
}

body[data-page="procesos"] .page-intro .search-field-group {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  min-width: 0;
}
body[data-page="procesos"] .search-field-group .search-field-label { margin-top: 0; }
body[data-page="procesos"] .search-field-group .page-search { margin-top: .5rem; }
@media (max-width: 640px) {
  body[data-page="procesos"] .page-intro .search-field-group { grid-column: auto; grid-row: auto; margin-top: 1rem; }
}

body[data-page="procesos"] #macroprocesos > div:first-child {
  justify-content: flex-end;
  margin-bottom: 1rem;
}

body[data-page="procesos"] #macroprocesos > div:first-child > div:first-child { display: none; }

@media (max-width: 640px) {
  body[data-page="procesos"] .page-intro > div { display: block; }
  body[data-page="procesos"] .page-intro .page-search { margin-top: 1rem; }
}

/* Jerarquía de encabezados para navegación multipágina. */
body[data-page="manual"] .page-intro {
  padding: 2.45rem 0 2.1rem;
}

body[data-page="manual"] .page-intro h1 {
  font-size: clamp(1.95rem, 3.4vw, 2.65rem);
}

body[data-page="procesos"] .page-intro,
body[data-page="lineamientos"] .page-intro,
body[data-page="normatividad"] .page-intro,
body[data-page="pdi"] .page-intro,
body[data-page="busqueda"] .page-intro {
  padding: 1.55rem 0 1.35rem;
}

body[data-page="procesos"] .page-intro h1,
body[data-page="lineamientos"] .page-intro h1,
body[data-page="normatividad"] .page-intro h1,
body[data-page="pdi"] .page-intro h1,
body[data-page="busqueda"] .page-intro h1 {
  font-size: clamp(1.7rem, 2.7vw, 2.25rem);
}

body[data-page="procesos"] .page-intro p:not(.page-kicker),
body[data-page="lineamientos"] .page-intro p:not(.page-kicker),
body[data-page="normatividad"] .page-intro p:not(.page-kicker),
body[data-page="pdi"] .page-intro p:not(.page-kicker),
body[data-page="busqueda"] .page-intro p:not(.page-kicker) {
  margin-top: .45rem;
  font-size: .9rem;
}

@media (max-width: 640px) {
  body[data-page="filosofia"] .page-intro { padding: 1.5rem 0 1.25rem; }
  body[data-page="manual"] .page-intro { padding: 1.7rem 0 1.45rem; }
  body[data-page="procesos"] .page-intro,
  body[data-page="lineamientos"] .page-intro,
  body[data-page="normatividad"] .page-intro,
  body[data-page="pdi"] .page-intro,
  body[data-page="busqueda"] .page-intro { padding: 1.2rem 0 1.1rem; }
}

/* Patrón definitivo: todas las vistas priorizan contenido sobre cabecera. */
body[data-page] .page-intro {
  padding: 1.55rem 0 1.35rem;
}

.normateca-document:hover {
  background-color: rgba(128, 0, 32, .05);
}

body[data-page] .page-intro h1 {
  font-size: clamp(1.7rem, 2.7vw, 2.25rem);
}

body[data-page] .page-intro p:not(.page-kicker) {
  margin-top: .45rem;
  font-size: .9rem;
}

@media (max-width: 640px) {
  body[data-page] .page-intro { padding: 1.2rem 0 1.1rem; }
}
