/**
 * GRUPO VÍA MOTOS - Sistema de Tipografía
 * 
 * Sistema tipográfico completo con escalas modulares,
 * estilos de texto y utilidades responsive
 * 
 * @version 1.0
 * @date Diciembre 2024
 */

/* ============================================
   IMPORTACIÓN DE FUENTES
   ============================================ */

/* Google Fonts - Saira Semi Condensed */
@import url('https://fonts.googleapis.com/css2?family=Saira+Semi+Condensed:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   ESTILOS BASE DE TIPOGRAFÍA
   ============================================ */

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    letter-spacing: var(--letter-spacing-normal);
}

/* ============================================
   HEADINGS - Estilos por defecto
   ============================================ */

h1, .h1 {
    font-family: var(--font-heading);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-6);
    color: var(--color-text-primary-alt);
}

h2, .h2 {
    font-family: var(--font-heading);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-5);
    color: var(--color-text-primary-alt);
}

h3, .h3 {
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

h4, .h4 {
    font-family: var(--font-primary);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

h5, .h5 {
    font-family: var(--font-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-3);
    color: var(--color-text-secondary);
}

h6, .h6 {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-3);
    color: var(--color-gray-800);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

/* ============================================
   RESPONSIVE HEADINGS
   ============================================ */

@media (min-width: 768px) {
    h1, .h1 {
        font-size: var(--font-size-5xl);
    }
    
    h2, .h2 {
        font-size: var(--font-size-4xl);
    }
    
    h3, .h3 {
        font-size: var(--font-size-3xl);
    }
}

/* ============================================
   PÁRRAFOS
   ============================================ */

p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--color-gray-700);
}

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

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

/* ============================================
   ENLACES
   ============================================ */

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

.link-underline {
    text-decoration: underline;
}

.link-no-underline {
    text-decoration: none;
}

.link-no-underline:hover {
    text-decoration: none;
}

/* ============================================
   ESTILOS DE TEXTO
   ============================================ */

/* Font weights */
.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); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

/* Font sizes */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Text transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Text decoration */
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* Font style */
.italic { font-style: italic; }
.not-italic { font-style: normal; }

/* Line height */
.leading-tight { line-height: var(--line-height-tight); }
.leading-normal { line-height: var(--line-height-normal); }
.leading-relaxed { line-height: var(--line-height-relaxed); }
.leading-loose { line-height: var(--line-height-loose); }

/* Letter spacing */
.tracking-tight { letter-spacing: var(--letter-spacing-tight); }
.tracking-normal { letter-spacing: var(--letter-spacing-normal); }
.tracking-wide { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider { letter-spacing: var(--letter-spacing-wider); }

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

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-white { color: var(--color-white); }
.text-black { color: var(--color-black); }

.text-gray-50 { color: var(--color-gray-50); }
.text-gray-100 { color: var(--color-gray-100); }
.text-gray-200 { color: var(--color-gray-200); }
.text-gray-300 { color: var(--color-gray-300); }
.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }
.text-gray-800 { color: var(--color-gray-800); }
.text-gray-900 { color: var(--color-gray-900); }

.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-info { color: var(--color-info); }

/* ============================================
   LISTAS
   ============================================ */

ul, ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: var(--space-2);
    line-height: var(--line-height-relaxed);
}

li:last-child {
    margin-bottom: 0;
}

.list-none {
    list-style: none;
    padding-left: 0;
}

.list-disc {
    list-style-type: disc;
}

.list-decimal {
    list-style-type: decimal;
}

/* ============================================
   BLOCKQUOTE
   ============================================ */

blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-6);
    border-left: 4px solid var(--color-primary);
    background-color: var(--color-gray-50);
    font-style: italic;
    color: var(--color-gray-700);
}

blockquote p {
    margin-bottom: var(--space-2);
}

blockquote cite {
    display: block;
    margin-top: var(--space-3);
    font-size: var(--font-size-sm);
    font-style: normal;
    color: var(--color-gray-600);
}

blockquote cite::before {
    content: "— ";
}

/* ============================================
   CÓDIGO
   ============================================ */

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: 0.125rem 0.375rem;
    background-color: var(--color-gray-100);
    border-radius: var(--border-radius-sm);
    color: var(--color-primary);
}

pre {
    margin: var(--space-4) 0;
    padding: var(--space-4);
    background-color: var(--color-gray-900);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
}

pre code {
    padding: 0;
    background-color: transparent;
    color: var(--color-gray-100);
    font-size: var(--font-size-sm);
}

/* ============================================
   ELEMENTOS SEMÁNTICOS
   ============================================ */

strong, b {
    font-weight: var(--font-weight-bold);
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--font-size-sm);
}

mark {
    background-color: #FEF3C7;
    color: var(--color-gray-900);
    padding: 0.125rem 0.25rem;
    border-radius: var(--border-radius-sm);
}

abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

hr {
    margin: var(--space-8) 0;
    border: none;
    border-top: 1px solid var(--color-gray-200);
}

/* ============================================
   UTILIDADES DE TEXTO
   ============================================ */

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

.line-clamp-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.whitespace-normal { white-space: normal; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre { white-space: pre; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-pre-wrap { white-space: pre-wrap; }

.break-normal { word-break: normal; overflow-wrap: normal; }
.break-words { overflow-wrap: break-word; }
.break-all { word-break: break-all; }

/* ============================================
   RESPONSIVE TYPOGRAPHY - MD (768px+)
   ============================================ */

@media (min-width: 768px) {
    .md\:text-xs { font-size: var(--font-size-xs); }
    .md\:text-sm { font-size: var(--font-size-sm); }
    .md\:text-base { font-size: var(--font-size-base); }
    .md\:text-lg { font-size: var(--font-size-lg); }
    .md\:text-xl { font-size: var(--font-size-xl); }
    .md\:text-2xl { font-size: var(--font-size-2xl); }
    .md\:text-3xl { font-size: var(--font-size-3xl); }
    .md\:text-4xl { font-size: var(--font-size-4xl); }
    
    .md\:text-left { text-align: left; }
    .md\:text-center { text-align: center; }
    .md\:text-right { text-align: right; }
}

/* ============================================
   RESPONSIVE TYPOGRAPHY - LG (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    .lg\:text-xs { font-size: var(--font-size-xs); }
    .lg\:text-sm { font-size: var(--font-size-sm); }
    .lg\:text-base { font-size: var(--font-size-base); }
    .lg\:text-lg { font-size: var(--font-size-lg); }
    .lg\:text-xl { font-size: var(--font-size-xl); }
    .lg\:text-2xl { font-size: var(--font-size-2xl); }
    .lg\:text-3xl { font-size: var(--font-size-3xl); }
    .lg\:text-4xl { font-size: var(--font-size-4xl); }
    .lg\:text-5xl { font-size: var(--font-size-5xl); }
    
    .lg\:text-left { text-align: left; }
    .lg\:text-center { text-align: center; }
    .lg\:text-right { text-align: right; }
}
