/* ============================================================
   EXTENDED UTILITY CLASSES - Additional Alignment & Responsive Helpers
   ============================================================ */

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

.font-bold { font-weight: bold; }
.font-normal { font-weight: normal; }
.font-light { font-weight: 300; }
.font-semibold { font-weight: 600; }

.text-italic { font-style: italic; }
.text-underline { text-decoration: underline; }

.line-height-tight { line-height: var(--line-height-tight); }
.line-height-normal { line-height: var(--line-height-base); }

/* ------ Additional Margin Utilities ------ */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-xs); }
.m-2 { margin: var(--space-sm); }
.m-3 { margin: var(--space-md); }
.m-4 { margin: var(--space-lg); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }

.mx-0 { margin-left: 0; margin-right: 0; }
.my-0 { margin-top: 0; margin-bottom: 0; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* ------ Additional Padding Utilities ------ */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }
.pr-0 { padding-right: 0; }

.px-0 { padding-left: 0; padding-right: 0; }
.py-0 { padding-top: 0; padding-bottom: 0; }

.px-1 { padding-left: var(--space-xs); padding-right: var(--space-xs); }
.py-1 { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }

/* ------ Flexbox Extended ------ */
.flex-0 { flex: 0; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }
.flex-auto { flex: auto; }

.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col-reverse { flex-direction: column-reverse; }

.flex-nowrap { flex-wrap: nowrap; }
.flex-wrap { flex-wrap: wrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

.content-start { align-content: flex-start; }
.content-end { align-content: flex-end; }
.content-center { align-content: center; }
.content-between { align-content: space-between; }
.content-around { align-content: space-around; }

.gap-0 { gap: 0; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }

/* ------ Display Utilities ------ */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.table { display: table; }
.table-cell { display: table-cell; }
.table-row { display: table-row; }
.hidden { display: none; }

/* ------ Visibility ------ */
.invisible { visibility: hidden; }
.visible { visibility: visible; }

/* ------ Width & Height ------ */
.w-auto { width: auto; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-min { width: min-content; }
.w-max { width: max-content; }

.h-auto { height: auto; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-min { height: min-content; }
.h-max { height: max-content; }

.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.min-h-0 { min-height: 0; }
.min-h-full { min-height: 100%; }
.min-h-screen { min-height: 100vh; }

.max-w-full { max-width: 100%; }
.max-w-screen { max-width: 100vw; }
.max-h-full { max-height: 100%; }
.max-h-screen { max-height: 100vh; }

/* ------ Position Utilities ------ */
.static { position: static; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.inset-y-0 { top: 0; bottom: 0; }

.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.top-full { top: 100%; }
.right-full { right: 100%; }
.bottom-full { bottom: 100%; }
.left-full { left: 100%; }

/* ------ Color Text Utilities ------ */
.text-primary { color: var(--color-primary); }
.text-primary-dark { color: var(--color-primary-dark); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-info { color: var(--color-info); }
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray { color: #999999; }
.text-muted { color: var(--color-text-muted); }

/* ------ Background Color Utilities ------ */
.bg-primary { background-color: var(--color-primary); }
.bg-primary-dark { background-color: var(--color-primary-dark); }
.bg-primary-light { background-color: var(--color-primary-light); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-success { background-color: var(--color-success); }
.bg-warning { background-color: var(--color-warning); }
.bg-danger { background-color: var(--color-danger); }
.bg-info { background-color: var(--color-info); }
.bg-white { background-color: #ffffff; }
.bg-light { background-color: var(--color-bg-light); }
.bg-lighter { background-color: var(--color-bg-lighter); }

/* ------ Border Utilities ------ */
.border-0 { border: none; }
.border { border: 1px solid var(--color-border); }
.border-2 { border: 2px solid var(--color-border); }
.border-4 { border: 4px solid var(--color-border); }

.border-t { border-top: 1px solid var(--color-border); }
.border-r { border-right: 1px solid var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }
.border-l { border-left: 1px solid var(--color-border); }

.border-primary { border-color: var(--color-primary); }
.border-secondary { border-color: var(--color-secondary); }
.border-success { border-color: var(--color-success); }
.border-danger { border-color: var(--color-danger); }
.border-warning { border-color: var(--color-warning); }
.border-info { border-color: var(--color-info); }

.border-dashed { border-style: dashed; }
.border-dotted { border-style: dotted; }
.border-double { border-style: double; }

/* ------ Border Radius ------ */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.rounded-t-sm { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.rounded-t { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.rounded-t-lg { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

.rounded-r-sm { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rounded-r { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.rounded-r-lg { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

.rounded-b-sm { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.rounded-b { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.rounded-b-lg { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.rounded-l-sm { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.rounded-l { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.rounded-l-lg { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }

/* ------ Shadow Utilities ------ */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.shadow-inset { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12); }

/* ------ Opacity Utilities ------ */
.opacity-0 { opacity: 0; }
.opacity-10 { opacity: 0.1; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* ------ Cursor Utilities ------ */
.cursor-auto { cursor: auto; }
.cursor-default { cursor: default; }
.cursor-pointer { cursor: pointer; }
.cursor-wait { cursor: wait; }
.cursor-text { cursor: text; }
.cursor-move { cursor: move; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-help { cursor: help; }

/* ------ Overflow Utilities ------ */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

.overflow-x-auto { overflow-x: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-x-visible { overflow-x: visible; }

.overflow-y-auto { overflow-y: auto; }
.overflow-y-hidden { overflow-y: hidden; }
.overflow-y-visible { overflow-y: visible; }

/* ------ Vertical Alignment ------ */
.align-baseline { vertical-align: baseline; }
.align-top { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }
.align-text-top { vertical-align: text-top; }
.align-text-bottom { vertical-align: text-bottom; }

/* ------ Object Fit ------ */
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }
.object-fill { object-fit: fill; }
.object-none { object-fit: none; }
.object-scale-down { object-fit: scale-down; }

/* ------ List Styles ------ */
.list-none { list-style: none; }
.list-decimal { list-style: decimal; }
.list-disc { list-style: disc; }

/* ------ Transition & Animation ------ */
.transition-none { transition: none; }
.transition-fast { transition: all var(--transition-fast); }
.transition { transition: all var(--transition-normal); }
.transition-slow { transition: all var(--transition-slow); }

/* ------ Transform Utilities ------ */
.transform { transform: translateY(0); }
.scale-75 { transform: scale(0.75); }
.scale-90 { transform: scale(0.9); }
.scale-100 { transform: scale(1); }
.scale-110 { transform: scale(1.1); }
.scale-125 { transform: scale(1.25); }

.rotate-0 { transform: rotate(0deg); }
.rotate-45 { transform: rotate(45deg); }
.rotate-90 { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }

/* ------ Hover & Focus States ------ */
.hover\:shadow:hover { box-shadow: var(--shadow-lg); }
.hover\:opacity:hover { opacity: 0.8; }
.hover\:scale:hover { transform: scale(1.05); }
.hover\:bg-light:hover { background-color: var(--color-bg-lighter); }

.focus\:outline-none:focus { outline: none; }
.focus\:border-primary:focus { border-color: var(--color-primary); }

/* ------ Responsive Display Helpers ------ */
.hide-on-mobile { display: none; }
.hide-on-tablet { display: inherit; }
.hide-on-desktop { display: inherit; }

@media (min-width: 480px) {
  .hide-on-mobile { display: inherit; }
  .hide-on-tablet { display: none; }
}

@media (min-width: 768px) {
  .hide-on-tablet { display: inherit; }
  .hide-on-desktop { display: none; }
  .show-on-desktop { display: inherit; }
}

@media (min-width: 1024px) {
  .hide-on-desktop { display: inherit; }
  .show-on-desktop { display: inherit; }
}

/* ------ Utility: Clearfix ------ */
.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

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

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

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

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

/* ------ Spacing Auto ------ */
.space-between { justify-content: space-between; }
.space-around { justify-content: space-around; }
.space-evenly { justify-content: space-evenly; }

/* ------ Aspect Ratio ------ */
.aspect-square {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
}

.aspect-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}

.aspect-auto {
  position: static;
  padding-bottom: auto;
}
