/* ========================================
   TIPOGRAFÍA - NotIA Design System
   ======================================== */

/* ========================================
   RESET Y BASE
   ======================================== */

* {
  font-family: var(--font-family-primary);
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   JERARQUÍA DE TÍTULOS
   ======================================== */

h1, .h1 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
}

h2, .h2 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h3, .h3 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h4, .h4 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

h5, .h5 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

h6, .h6 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

/* ========================================
   TEXTOS ESPECIALES
   ======================================== */

.text-display {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  color: var(--text-primary);
}

.text-lead {
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.text-small {
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.text-xs {
  font-size: var(--font-size-xs);
  line-height: 1.4;
}

/* ========================================
   PESOS DE FUENTE
   ======================================== */

.font-light {
  font-weight: var(--font-weight-light);
}

.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* ========================================
   COLORES DE TEXTO
   ======================================== */

.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-white {
  color: var(--text-white) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.text-error {
  color: var(--error-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

/* ========================================
   TIPOGRAFÍA ESPECÍFICA DE COMPONENTES
   ======================================== */

/* Sidebar */
.sidebar {
  font-family: var(--font-family-primary);
}

.sidebar .nav-link {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-white);
}

.sidebar .nav-link:hover {
  color: var(--text-white);
  font-weight: var(--font-weight-semibold);
}

.sidebar .sidebar-logo-text {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-white);
}

/* Cards */
.card-title {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.card-text {
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Botones */
.btn {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
}

.btn-sm {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.btn-lg {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

/* Formularios */
.form-label {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.form-control {
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
}

.form-control::placeholder {
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
}

/* Tablas */
.table {
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-sm);
}

.table th {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.table td {
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
}

/* ========================================
   RESPONSIVE TIPOGRAFÍA
   ======================================== */

@media (max-width: 768px) {
  h1, .h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2, .h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3, .h3 {
    font-size: var(--font-size-xl);
  }
  
  .text-display {
    font-size: var(--font-size-3xl);
  }
  
  .text-lead {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 576px) {
  h1, .h1 {
    font-size: var(--font-size-2xl);
  }
  
  h2, .h2 {
    font-size: var(--font-size-xl);
  }
  
  h3, .h3 {
    font-size: var(--font-size-lg);
  }
  
  .text-display {
    font-size: var(--font-size-2xl);
  }
}

/* ========================================
   UTILIDADES DE TIPOGRAFÍA
   ======================================== */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-lowercase {
  text-transform: lowercase;
}

.text-capitalize {
  text-transform: capitalize;
}

.text-nowrap {
  white-space: nowrap;
}

.text-break {
  word-wrap: break-word;
  word-break: break-word;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========================================
   ESPACIADO DE TEXTO
   ======================================== */

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }
