/* ===================================
   Typography & Text Utilities
   =================================== */

/* Headings */
.h1, .h2, .h3, .h4, .h5, .h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.h1 { font-size: 2.5rem; }
.h2 { font-size: 2rem; }
.h3 { font-size: 1.75rem; }
.h4 { font-size: 1.5rem; }
.h5 { font-size: 1.25rem; }
.h6 { font-size: 1rem; }

/* Display headings */
.display-1 { font-size: 6rem; font-weight: 300; line-height: 1.2; }
.display-2 { font-size: 5.5rem; font-weight: 300; line-height: 1.2; }
.display-3 { font-size: 4.5rem; font-weight: 300; line-height: 1.2; }
.display-4 { font-size: 3.5rem; font-weight: 300; line-height: 1.2; }
.display-5 { font-size: 3rem; font-weight: 300; line-height: 1.2; }
.display-6 { font-size: 2.5rem; font-weight: 300; line-height: 1.2; }

/* Lead text */
.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-primary);
}

/* Text sizing */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* Text colors */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-primary-light); }
.text-light { color: #495057; }
.text-dark { color: var(--color-text-primary); }
.text-muted { color: var(--color-text-tertiary); }
.text-white { color: #ffffff; }

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

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

/* Font weight */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.fw-bolder { font-weight: 800; }

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

/* Line height */
.lh-1 { line-height: 1; }
.lh-sm { line-height: 1.25; }
.lh-base { line-height: 1.5; }
.lh-lg { line-height: 2; }

/* White space */
.text-wrap { white-space: normal; }
.text-nowrap { white-space: nowrap; }

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

/* List styles */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}

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

.list-inline-item {
  display: inline-block;
}

.list-inline-item:not(:last-child) {
  margin-right: 0.5rem;
}

/* Blockquotes */
.blockquote {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 300;
}

.blockquote-footer {
  margin-top: -1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.blockquote-footer::before {
  content: "— ";
}

/* Text break */
.text-break {
  word-wrap: break-word !important;
  word-break: break-word !important;
}

/* ===================================
   Visibility Utilities
   =================================== */

.visible { visibility: visible; }
.invisible { visibility: hidden; }

.d-none { display: none; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-block { display: block; }
.d-table { display: table; }
.d-table-row { display: table-row; }
.d-table-cell { display: table-cell; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

/* Responsive display utilities */
@media (min-width: 576px) {
  .d-sm-none { display: none; }
  .d-sm-inline { display: inline; }
  .d-sm-inline-block { display: inline-block; }
  .d-sm-block { display: block; }
  .d-sm-table { display: table; }
  .d-sm-table-row { display: table-row; }
  .d-sm-table-cell { display: table-cell; }
  .d-sm-flex { display: flex; }
  .d-sm-inline-flex { display: inline-flex; }
}

@media (min-width: 768px) {
  .d-md-none { display: none; }
  .d-md-inline { display: inline; }
  .d-md-inline-block { display: inline-block; }
  .d-md-block { display: block; }
  .d-md-table { display: table; }
  .d-md-table-row { display: table-row; }
  .d-md-table-cell { display: table-cell; }
  .d-md-flex { display: flex; }
  .d-md-inline-flex { display: inline-flex; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none; }
  .d-lg-inline { display: inline; }
  .d-lg-inline-block { display: inline-block; }
  .d-lg-block { display: block; }
  .d-lg-table { display: table; }
  .d-lg-table-row { display: table-row; }
  .d-lg-table-cell { display: table-cell; }
  .d-lg-flex { display: flex; }
  .d-lg-inline-flex { display: inline-flex; }
}

@media (min-width: 1200px) {
  .d-xl-none { display: none; }
  .d-xl-inline { display: inline; }
  .d-xl-inline-block { display: inline-block; }
  .d-xl-block { display: block; }
  .d-xl-table { display: table; }
  .d-xl-table-row { display: table-row; }
  .d-xl-table-cell { display: table-cell; }
  .d-xl-flex { display: flex; }
  .d-xl-inline-flex { display: inline-flex; }
}

/* ===================================
   Border Utilities
   =================================== */

.border { border: 1px solid var(--color-border); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--color-border); }
.border-end { border-right: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }
.border-start { border-left: 1px solid var(--color-border); }

.border-primary { border-color: var(--color-primary); }
.border-secondary { border-color: var(--color-text-secondary); }
.border-success { border-color: var(--color-success); }
.border-danger { border-color: var(--color-error); }
.border-warning { border-color: var(--color-warning); }
.border-info { border-color: var(--color-primary-light); }
.border-light { border-color: #e9ecef; }
.border-dark { border-color: #343a40; }
.border-white { border-color: #ffffff; }

.rounded { border-radius: var(--radius-md); }
.rounded-0 { border-radius: 0; }
.rounded-1 { border-radius: var(--radius-sm); }
.rounded-2 { border-radius: var(--radius-md); }
.rounded-3 { border-radius: var(--radius-lg); }
.rounded-circle { border-radius: 50%; }
.rounded-pill { border-radius: var(--radius-full); }

.rounded-top { border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }
.rounded-end { border-top-right-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }
.rounded-bottom { border-bottom-left-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }
.rounded-start { border-top-left-radius: var(--radius-md); border-bottom-left-radius: var(--radius-md); }

/* ===================================
   Position Utilities
   =================================== */

.position-static { position: static; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

.top-0 { top: 0; }
.top-50 { top: 50%; }
.top-100 { top: 100%; }

.bottom-0 { bottom: 0; }
.bottom-50 { bottom: 50%; }
.bottom-100 { bottom: 100%; }

.start-0 { left: 0; }
.start-50 { left: 50%; }
.start-100 { left: 100%; }

.end-0 { right: 0; }
.end-50 { right: 50%; }
.end-100 { right: 100%; }

.translate-middle {
  transform: translate(-50%, -50%);
}

.translate-middle-x {
  transform: translateX(-50%);
}

.translate-middle-y {
  transform: translateY(-50%);
}