/* ===============================================
   JASHAN.RU - TYPOGRAPHY STYLES
   Заголовки, параграфы, текстовые стили
   =============================================== */

/* ========== ЗАГОЛОВКИ ========== */

h1, .h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  margin-bottom: var(--spacing-xl);
}

h2, .h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

h3, .h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark);
  margin-bottom: var(--spacing-lg);
}

h4, .h4 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark);
  margin-bottom: var(--spacing-md);
}

h5, .h5 {
  font-size: var(--font-size-h5);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

h6, .h6 {
  font-size: var(--font-size-h6);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray);
  margin-bottom: var(--spacing-sm);
}


/* ========== ПАРАГРАФЫ И ТЕКСТ ========== */

p {
  margin-bottom: var(--spacing-lg);
  max-width: 75ch; /* Ограничение длины строки для читаемости */
}

.text-large {
  font-size: var(--font-size-body-large);
  line-height: var(--line-height-relaxed);
}

.text-small {
  font-size: var(--font-size-body-small);
  line-height: var(--line-height-relaxed);
}

.text-caption {
  font-size: var(--font-size-caption);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray);
}


/* ========== УТИЛИТЫ ДЛЯ ТЕКСТА ========== */

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

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

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

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

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

.text-accent {
  color: var(--color-accent);
}

.text-gray {
  color: var(--color-gray);
}

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

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

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

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


/* ========== ССЫЛКИ ========== */

a {
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--color-accent);
}


/* ========== СПИСКИ ========== */

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

.list-styled li {
  position: relative;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
}

.list-styled li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}


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

blockquote {
  padding-left: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
  font-style: italic;
  color: var(--color-light);
}


/* ========== RESPONSIVE ADJUSTMENTS ========== */

@media (max-width: 767px) {
  p {
    max-width: 100%;
  }
  
  h1, .h1 {
    margin-bottom: var(--spacing-lg);
  }
  
  h2, .h2 {
    margin-bottom: var(--spacing-md);
  }
}
