/* ============================================
   FUENTES — Neutrif (sans-serif)
   Convención: una font-family por peso (neutrif-light/regular/
   medium/semibold/bold) en lugar de una familia con varios pesos.
   local() permite usar la fuente instalada en el sistema si
   existe, evitando la descarga. font-display: swap evita el
   FOIT — el texto se muestra con la fuente fallback y se
   sustituye al cargar la web. Servimos woff2 (formato moderno,
   más comprimido) con fallback a woff para navegadores muy
   antiguos.
   ============================================ */
@font-face {
  font-family: "neutrif-light";
  font-weight: 300;
  font-display: swap;
  src: local("Neutrif Pro Light"),
       url('assets/fonts/neutrif/font-light.woff2') format('woff2'),
       url('assets/fonts/neutrif/font-light.woff') format('woff');
}
@font-face {
  font-family: "neutrif-regular";
  font-weight: 400;
  font-display: swap;
  src: local("Neutrif Pro Regular"),
       url('assets/fonts/neutrif/font-regular.woff2') format('woff2'),
       url('assets/fonts/neutrif/font-regular.woff') format('woff');
}
@font-face {
  font-family: "neutrif-medium";
  font-weight: 500;
  font-display: swap;
  src: local("Neutrif Pro Medium"),
       url('assets/fonts/neutrif/font-medium.woff2') format('woff2'),
       url('assets/fonts/neutrif/font-medium.woff') format('woff');
}
@font-face {
  font-family: "neutrif-semibold";
  font-weight: 600;
  font-display: swap;
  src: local("Neutrif Pro SemiBold"),
       url('assets/fonts/neutrif/font-semibold.woff2') format('woff2'),
       url('assets/fonts/neutrif/font-semibold.woff') format('woff');
}
@font-face {
  font-family: "neutrif-bold";
  font-weight: 700;
  font-display: swap;
  src: local("Neutrif Pro Bold"),
       url('assets/fonts/neutrif/font-bold.woff2') format('woff2'),
       url('assets/fonts/neutrif/font-bold.woff') format('woff');
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--hg-typo-font-family-primary-regular);
}

h2 {
  padding-top: 6rem;
  padding-bottom: 2rem;
}

/* ============================================
   LAYOUT Y ESTRUCTURA
   ============================================ */
.guide-container {
  margin: 0 2rem;
}

.guide-main-content {
  margin-left: 0;
  flex: 1;
  padding: 0;
  padding-bottom: 10rem;
  max-width: 100%;
}

.guide-main-content h2 {
  font-size: 50px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  font-weight: 500;
  color: #000;
  font-family: var(--hg-typo-font-family-primary-bold);
  letter-spacing: 0;
}

.guide-main-content h3 {
  font-family: var(--hg-typo-font-family-primary-regular);
  color: #000;
  font-size: 16px;
  line-height: 28px;
  margin: 80px 0 12px;
}

@media (min-width: 768px) {
  .guide-main-content h2 {
    font-size: 64px;
    padding-bottom: 40px;
    margin-bottom: 10px;
  }

  .guide-main-content h3 {
    font-family: var(--hg-typo-font-family-primary-regular);
    color: #000;
    font-size: 20px;
    line-height: 28px;
    margin: 80px 0 12px;
  }
  
  .guide-section-description {
    font-size: 28px;
  }
}

.guide-main-content strong {
  font-weight: 700;
}

.guide-section {
  background: white;
  border-radius: 8px;
}

.guide-section.guide-section--highlighted {
  background: #fff;
  padding: 5rem 0 2rem 0;
}
@media (min-width: 768px) {
  .guide-section.guide-section--highlighted {
    padding: 5rem 0;
  }
}

.guide-section-title {
  font-size: 1.5rem;
  font-weight: 500;
  padding-bottom: 2rem;
  line-height: 1.2;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .guide-section-title {
    margin-top: 3rem;
    flex-direction: row;
  }
}

.guide-section-description {
  margin-top: 1rem;
  font-size: 28px;
  color: #000000;
  font-family: var(--hg-typo-font-family-primary-light);
  margin-bottom: 20px;

  line-height: 1.2;
  width: 100%;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.guide-section-description {
  margin-top: 1rem;
  font-size: 28px;
  color: #000000;
  font-family: var(--hg-typo-font-family-primary-light);
  margin-bottom: 20px;

  line-height: 1.2;
  width: 100%;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}


/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
.guide-header {
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(239, 239, 239, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-direction: column;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .guide-header {
    flex-direction: row;
  }
}

.guide-header:not([style*="height"]) {
  height: auto;
  min-height: 60px;
}

.guide-header p {
  margin: 1rem 0 0 0;
  opacity: 0.7;
}

.guide-logo {
  font-size: 14px;
  font-weight: 300;
  color: #000;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid #000000;
  padding: 4px;
  border-radius: 8px;
  width: max-content;
}

.guide-logo a {
  color: #000;
  text-decoration: none;
}

.guide-logo a:visited {
  color: #000;
}

.guide-logo a:hover {
  color: #000;
}

/* Nav links unificado */
.guide-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.guide-nav a {
  font-family: var(--hg-typo-font-family-primary-regular);
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.guide-nav a:hover {
  color: #000;
}
.guide-nav a.active {
  color: #000;
  font-weight: 600;
}

.guide-header-button {
  color: black;
  border: 1px solid #000000;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  font-weight: 500;
  transition: background 0.2s ease;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.guide-header-button:hover {
  background: var(--hg-color-dark-grey, #333);
}

/* ============================================
   SIDEBAR
   ============================================ */
.guide-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.guide-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.guide-sidebar {
  position: fixed;
  right: -250px;
  top: 16px;
  width: 250px;
  border-radius: 20px;
  background: white;
  border: 1px solid black;
  padding: 2rem 0;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
}

.guide-sidebar.open {
  right: 2rem;
}

.guide-sidebar-header {
  padding: 0 1.5rem 2rem 1.5rem;
  border-bottom: 1px solid #efefef;
  margin-bottom: 1rem;
}

.guide-sidebar-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
}

.guide-sidebar-nav {
  padding: 0;
}

.guide-sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  border-top: 1px solid #efefef;
  background: white;
}

.guide-sidebar-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.guide-sidebar-badges img {
  height: 20px;
  width: auto;
}

.guide-sidebar-title {
  font-size: 24px;
  color: #cccccc;
  margin-bottom: 1rem;
  padding: 0.2rem 1rem;
}

.guide-menu-item {
  display: block;
  padding: 0.2rem 1rem;
  margin-bottom: 0.25rem;
  color: black;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 24px;
  font-weight: 300;
}

.guide-menu-item:hover {
  background: #f0f0f0;
  color: #000;
}

.guide-menu-item.active {
  color: black;
}

/* ============================================
   TABLAS
   ============================================ */
.guide-table-wrapper {
  overflow: auto;
}

/* ============================================
   VARIABLES CSS — Grid de 3 columnas compacto
   ============================================ */
.guide-variables-grid {
  column-count: 2;
  column-gap: 2rem;
  margin-top: 0;
  font-family: var(--hg-typo-font-family-primary-regular);
}
@media (max-width: 720px) {
  .guide-variables-grid { column-count: 1; }
}
.guide-variables-group {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e9e9e9;
  border-radius: 6px;
  background: #fff;
  display: block;
}
.guide-variables-group-title {
  margin: 0 0 0.5rem;
  font-family: var(--hg-typo-font-family-primary-regular);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #737373;
}
.guide-variables-group-count {
  color: #a9a9a9;
  font-weight: 400;
  margin-left: 0.25rem;
}
.guide-variables-group-list {
  display: flex;
  flex-direction: column;
}
.guide-variable-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #efefef;
  min-width: 0;
  font-size: 0.72rem;
}
.guide-variables-group-list .guide-variable-item:last-child {
  border-bottom: 0;
}
.guide-variable-item .guide-variable-name {
  font-weight: 600;
  color: #000;
  word-break: break-all;
  cursor: pointer;
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
}
.guide-variable-item .guide-variable-values {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.68rem;
}
.guide-variable-item .guide-variable-value {
  color: #333;
  cursor: pointer;
  word-break: break-all;
  max-width: 180px;
}
.guide-variable-item .guide-value-center-blue,
.guide-variable-item .guide-value-center-orange {
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}
.guide-variable-item .guide-changed {
  background: transparent;
}
.guide-variable-item .guide-variable-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #e3e3e3;
  flex-shrink: 0;
  vertical-align: middle;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0rem;
  background: white;
  font-size: 0.875rem;
}

.guide-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
}

.guide-table thead th {
  background: white;
  position: sticky;
  top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #919191;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #ddd;
  padding: 0.75rem;
  padding-left: 0;
  text-align: left;
  z-index: 10;
}

.guide-table td {
  padding: 0.75rem;
  padding-left: 0;
  border-bottom: 1px solid #efefef;
  vertical-align: middle;
}

.guide-table tbody tr:hover {
  background: #f9f9f9;
}

.guide-table .guide-sub-header th {
  border-top: none;
  border-bottom: 1px solid #ddd;
  font-weight: 500;
  font-size: 0.6875rem;
}

.guide-table .guide-typography-preview {
  padding: 0.5rem;
  font-size: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
}

.guide-table .guide-font-family-preview {
  min-width: 100px;
  padding: 0.75rem;
  min-height: 50px;
  font-size: 1.5rem;
  /* Dejamos que cada font-family muestre su peso natural. En
     esta convención (una familia por peso) cada @font-face
     declara un único font-weight, así que forzar un weight
     aquí anula la diferencia visual entre light / regular /
     medium / semibold. */
  font-weight: normal;
}

/* Rectángulo de lados afectados (tabla spacing modernas) */
.guide-spacing-sides-box {
  width: 32px;
  height: 24px;
  box-sizing: border-box;
  border: 2px solid #e0e0e0;
  background: #fafafa;
  flex-shrink: 0;
}
.guide-spacing-sides-box.sides-inline {
  border-left-color: var(--hg-color-info, #0170e9);
  border-right-color: var(--hg-color-info, #0170e9);
  border-left-width: 3px;
  border-right-width: 3px;
}
.guide-spacing-sides-box.sides-block {
  border-top-color: var(--hg-color-info, #0170e9);
  border-bottom-color: var(--hg-color-info, #0170e9);
  border-top-width: 3px;
  border-bottom-width: 3px;
}
.guide-spacing-sides-box.sides-all {
  border-color: var(--hg-color-info, #0170e9);
  border-width: 3px;
}
.guide-spacing-sides-box.sides-top {
  border-top-color: var(--hg-color-info, #0170e9);
  border-top-width: 3px;
}
.guide-spacing-sides-box.sides-right {
  border-right-color: var(--hg-color-info, #0170e9);
  border-right-width: 3px;
}
.guide-spacing-sides-box.sides-bottom {
  border-bottom-color: var(--hg-color-info, #0170e9);
  border-bottom-width: 3px;
}
.guide-spacing-sides-box.sides-left {
  border-left-color: var(--hg-color-info, #0170e9);
  border-left-width: 3px;
}
.guide-spacing-sides-cell {
  vertical-align: middle;
  padding-right: 0.5rem;
}
.guide-spacing-sides-cell .guide-spacing-sides-box {
  display: block;
}

/* Tabla horizontal compacta de equivalencias valor/rem/px (poco espacio vertical) */
.guide-spacing-compact-wrap {
  overflow-x: auto;
  margin: 0.25rem 0;
  max-width: 100%;
}
.guide-table.guide-spacing-compact {
  font-size: 0.7rem;
  width: max-content;
  min-width: 100%;
  margin: 0;
}
.guide-table.guide-spacing-compact th,
.guide-table.guide-spacing-compact td {
  padding: 0.2rem 0.35rem;
  border: 1px solid #eee;
  white-space: nowrap;
}
.guide-table.guide-spacing-compact thead th {
  background: #f9f9f9;
  font-weight: 600;
}
.guide-table.guide-spacing-compact .guide-spacing-compact-label {
  font-weight: 600;
  background: #fafafa;
  color: #333;
}
.guide-spacing-compact-note {
  margin: 0.25rem 0 0 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ============================================
   TIPOGRAFÍA Y TEXTO
   ============================================ */
.guide-text-bold,
.guide-table .guide-table-name,
.guide-layout-class-name {
  font-weight: 600;
  color: #000000;
  font-family: var(--hg-typo-font-family-primary-regular);
}

.guide-text-regular,
.guide-table .guide-table-value {
  font-family: var(--hg-typo-font-family-primary-regular);
  color: #333;
  font-size: 13px;
}

.guide-text-medium,
.guide-table .guide-mobile-value,
.guide-table .guide-desktop-value,
.guide-table .guide-value-center-blue {
  font-weight: 500;
  font-family: var(--hg-typo-font-family-primary-regular);
  color: #000000;
}

.guide-text-gray,
.guide-layout-property,
.guide-color-var-name,
.guide-color-value {
  font-family: var(--hg-typo-font-family-primary-regular);
  color: #666;
  font-size: 13px;
}

.guide-text-small {
  font-size: 0.75rem;
  opacity: 0.6;
}

.guide-text-black {
  color: #000000;
}

.guide-text-orange {
  color: #cc6600;
}

.guide-text-blue {
  color: #0170e9;
}

.guide-table .guide-value-center-orange {
  font-weight: 500;
  font-family: var(--hg-typo-font-family-primary-regular);
  color: #cc6600;
}

.guide-meta,
.guide-meta-small,
.guide-sidebar-meta-small {
  font-size: 0.75rem;
  opacity: 0.6;
}

.guide-meta-small,
.guide-sidebar-meta-small {
  margin-top: 0.25rem;
}

.guide-meta-normal,
.guide-sidebar-meta {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* ============================================
   ESTADOS Y CAMBIOS
   ============================================ */
.guide-changed,
.guide-table td.guide-changed,
.guide-table td.guide-mobile-value.guide-changed,
.guide-table td.guide-desktop-value.guide-changed {
  background: #d4edda !important;
  border-left: 3px solid #28a745;
  font-weight: 600;
}

.guide-changed-text,
.guide-color-value.guide-changed {
  background: #d4edda;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* ============================================
   INTERACCIÓN
   ============================================ */
.guide-interactive,
.guide-color-var-name,
.guide-color-value,
.guide-copyable {
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}

.guide-interactive:hover,
.guide-color-var-name:hover,
.guide-color-value:hover,
.guide-copyable:hover {
  background-color: #f0f0f0;
  border-radius: 3px;
}

.guide-interactive:active,
.guide-copyable:active {
  background-color: #efefef;
}

/* ============================================
   POSICIONAMIENTO
   ============================================ */
.guide-absolute-center,
.guide-spacing-margin-box,
.guide-spacing-padding-box,
.guide-spacing-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.guide-absolute-center-x,
.guide-spacing-label-top,
.guide-spacing-label-bottom,
.guide-spacing-label-padding-top,
.guide-spacing-label-padding-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.guide-absolute-center-y,
.guide-spacing-label-left,
.guide-spacing-label-right,
.guide-spacing-label-padding-left,
.guide-spacing-label-padding-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* ============================================
   CÓDIGO
   ============================================ */
.guide-code,
.guide-info-box-code,
.guide-info-box-code-info {
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-family: var(--hg-typo-font-family-primary-regular);
  font-size: 0.875rem;
}

.guide-code-block,
.guide-code-example {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: var(--hg-typo-font-family-primary-regular);
  font-size: 12px;
  border-radius: 24px;
	margin-bottom: 24px;
}

/* ============================================
   BÚSQUEDA
   ============================================ */
.guide-search-container {
  position: relative;
}

.guide-search-input {
  max-width: 100%;
  padding: 0.75rem 3rem 0.75rem 2.75rem;
  border: 1px solid #000000;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  text-align: left;
  background: transparent;
}

.guide-search-input:focus {
  border: 2px solid #000000;
}

.guide-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.guide-clear-search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.25rem;
  display: none;
  font-size: 1.25rem;
  line-height: 1;
}

.guide-search-results {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #666;
  display: none;
}

@media (max-width: 768px) {
  .guide-header > div[style*="display: flex"] {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100% !important;
    max-width: 100%;
  }
  
  .guide-search-results {
    width: 100%;
    order: 3;
    margin-top: 0.5rem;
  }
  
  .guide-search-container {
    order: 1;
    flex: 1;
    min-width: 0;
    width: auto;
  }
  
  .guide-header-button {
    order: 2;
    margin-left: auto;
  }
}

.guide-search-highlight {
  background: #ffeb3b;
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
}

/* ============================================
   COLORES Y GRID
   ============================================ */
.guide-colors-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
  padding-inline: 0.5rem;
  padding-bottom: 2rem;
}

@media (max-width: 1280px) {
  .guide-colors-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .guide-colors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



.guide-color-card {
  background: white;
  border: 1px solid #efefef;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.guide-color-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.guide-color-card:active {
  transform: translateY(0);
}

.guide-color-preview {
  width: 100%;
  height: 120px;
  border-bottom: 1px solid #efefef;
  position: relative;
  background-color: var(--color-value);
}

.guide-color-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 20px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

.guide-color-card-content {
  padding: 1rem;
}

.guide-color-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #000;
}

/* ============================================
   INFO BOXES
   ============================================ */
.guide-info-box {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
}

/* Dos columnas para la explicación de helpers de espaciado */
.guide-spacing-explanation-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 0.5rem;
}
@media (max-width: 768px) {
  .guide-spacing-explanation-cols {
    grid-template-columns: 1fr;
  }
}
.guide-spacing-explanation-col {
  min-width: 0;
}

.guide-info-box-title {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.guide-info-box-title-info {
  color: #0170e9;
}

.guide-info-box-text {
  margin: 0 0 0.75rem 0;
  line-height: 1.6;
}

.guide-info-box-list {
  margin: 0 0 0.75rem 0;
  padding-top: 1.5rem;
  line-height: 1.8;
}

.guide-info-box-list-item {
  margin-bottom: 0.5rem;
}

.guide-info-box-text-small {
  margin: 0;
  line-height: 1.6;
  font-size: 0.875rem;
  opacity: 0.8;
}

.guide-info-box-margin-top {
  margin-top: 2rem;
}

/* ============================================
   SPACING DIAGRAM
   ============================================ */
.guide-spacing-diagram {
  width: 100%;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.guide-spacing-text {
  width: 50%;
}

.guide-spacing-diagram-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 300px;
}

.guide-spacing-margin-box {
  width: 80%;
  height: 70%;
  border: 1px dashed #cccccc;
  background: rgba(255, 152, 0, 0.05);
  border-radius: 4px;
}

.guide-spacing-padding-box {
  width: 60%;
  height: 50%;
  border: 1px dashed rgb(74, 95, 117);
  background: rgba(1, 112, 233, 0.05);
  border-radius: 4px;
}

.guide-spacing-content {
  width: 40%;
  height: 30%;
  background: #333;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.guide-spacing-label {
  position: absolute;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--hg-typo-font-family-primary-regular);
  color: #333;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.guide-spacing-label-top {
  top: 0;
}

.guide-spacing-label-bottom {
  bottom: 0;
}

.guide-spacing-label-left {
  left: 0;
}

.guide-spacing-label-right {
  right: 0;
}

.guide-spacing-label-margin {
  color: #ccc;
}

.guide-spacing-label-padding {
  color: #000;
}

.guide-spacing-label-padding-top {
  top: 15%;
}

.guide-spacing-label-padding-right {
  right: 10%;
}

.guide-spacing-label-padding-bottom {
  bottom: 15%;
}

.guide-spacing-label-padding-left {
  left: 10%;
}

/* ============================================
   TYPEFACE SPECIMEN
   ============================================ */
.guide-typeface-specimen {
  display: flex;
  padding: 3rem 0;
  margin-bottom: 3rem;
  border-bottom: 1px solid #e3e3e3;
  flex-direction: column;
}

@media (min-width: 768px) {
  .guide-typeface-specimen {
    flex-direction: row;
  }
}

.guide-typeface-left {
  font-family: var(--hg-typo-font-family-primary-regular);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 200px;
  width: 100%;
  margin-bottom: 2rem;
}

.guide-typeface-large-aa {
  font-size: 8rem;
  font-weight: 400;
  line-height: 1;
  color: #000;
}

.guide-typeface-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-typeface-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-typeface-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-typeface-value {
  font-size: 1rem;
  font-weight: 400;
  color: #000;
}

.guide-typeface-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.4;
  color: #000;
  width: 100%;
}

@media (min-width: 768px) {
  .guide-typeface-right,
  .guide-typeface-left {
    width: 50%;
    margin-bottom: 0;
  }
}

.guide-typeface-chars {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.guide-typeface-char {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
}

/* ============================================
   DEMO (Black&Yellow Theme)
   ============================================ */
.demo-container {
  margin: 0 auto;
  background-color: var(--hg-color-white);
  padding: var(--hg-spacing-32);
  transition: margin-left 0.3s ease;
}

.demo-section {
  margin-block-end: var(--hg-spacing-64);
}

.demo-section:last-child {
  margin-block-end: 0;
}

.demo-section-2 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--hg-spacing-24);
  max-width: 100%;
  margin-left: 0;
  margin-bottom: 10rem;
}

@media (min-width: 768px) {
  .demo-section-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 50%;
    margin-left: 50%;
    margin-bottom: 10rem;
  }
}

.demo-title {
  font-size: var(--hg-typo-font-size-12);
  font-weight: var(--hg-typo-font-weight-900);
  margin-block-end: var(--hg-spacing-24);
  padding-block-end: var(--hg-spacing-16);
  border-bottom: 2px solid var(--hg-color-primary);
  padding-top: var(--hg-spacing-32);
}

.demo-subtitle {
  font-size: var(--hg-typo-font-size-14);
  font-weight: var(--hg-typo-font-weight-700);
  margin-block-end: var(--hg-spacing-16);
  text-transform: uppercase;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--hg-spacing-24);
  margin-block-end: var(--hg-spacing-32);
}

.demo-item {
  padding: var(--hg-spacing-16);
  background-color: var(--hg-color-bg-light);
  border: 1px solid var(--hg-color-light-grey);
}

.demo-code {
  border-radius: 4px;
  background-color: #24292e;
  color: #00ff31;
  padding: var(--hg-spacing-16);
  font-family: monospace;
  font-size: var(--hg-typo-font-size-12);
  overflow-x: auto;
  margin-block-start: var(--hg-spacing-16);
}

.case-study-img-holygrail {
  background-image: url(assets/introm.jpg);
  height: 50vh;
  background-size: cover;
  background-position: 50%;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-study-holygrail-title {
  font-family: var(--hg-typo-font-family-primary-light);
  font-size: clamp(2.5rem, 12vw, 8rem);
  font-weight: 100;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  text-align: center;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .case-study-img-holygrail {
    background-image: url(assets/intro.jpg);
    height: 100vh;
    margin-inline: -2rem;
    background-attachment: scroll;
  }
  
  /* Solo aplicar fixed en navegadores que lo soportan (no iOS) */
  @supports not (-webkit-touch-callout: none) {
    .case-study-img-holygrail {
      background-attachment: fixed;
    }
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .guide-header {
    padding: 1rem 2rem;
  }

  .guide-header-button {
    display: block;
  }

  .guide-sidebar {
    top: 80px;
  }

  .guide-container {
    margin: 0 2rem;
  }
}

/* ============================================
   LEGACY (No usado)
   ============================================ */
.guide-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 101;
  background: white;
  border: 1px solid #efefef;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
