/* ==========================================================================
   Glacias Theme — Utilities
   Spacing, visibility, text helpers
   ========================================================================== */

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

/* --- Text Sizes --- */
.text-xs { font-size: var(--glacias-fs-xs); }
.text-sm { font-size: var(--glacias-fs-sm); }
.text-base { font-size: var(--glacias-fs-base); }
.text-lg { font-size: var(--glacias-fs-lg); }
.text-xl { font-size: var(--glacias-fs-xl); }
.text-2xl { font-size: var(--glacias-fs-2xl); }

/* --- Text Colors --- */
.text-primary { color: var(--glacias-primary); }
.text-secondary { color: var(--glacias-secondary); }
.text-muted { color: var(--glacias-text-muted); }
.text-light { color: var(--glacias-text-light); }

/* --- Font Weight --- */
.font-normal { font-weight: var(--glacias-fw-normal); }
.font-medium { font-weight: var(--glacias-fw-medium); }
.font-semibold { font-weight: var(--glacias-fw-semibold); }
.font-bold { font-weight: var(--glacias-fw-bold); }

/* --- Display --- */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

/* --- Flex Helpers --- */
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--glacias-space-1); }
.gap-2 { gap: var(--glacias-space-2); }
.gap-3 { gap: var(--glacias-space-3); }
.gap-4 { gap: var(--glacias-space-4); }
.gap-6 { gap: var(--glacias-space-6); }
.gap-8 { gap: var(--glacias-space-8); }

/* --- Margin --- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--glacias-space-2); }
.mt-4 { margin-top: var(--glacias-space-4); }
.mt-6 { margin-top: var(--glacias-space-6); }
.mt-8 { margin-top: var(--glacias-space-8); }
.mt-12 { margin-top: var(--glacias-space-12); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--glacias-space-2); }
.mb-4 { margin-bottom: var(--glacias-space-4); }
.mb-6 { margin-bottom: var(--glacias-space-6); }
.mb-8 { margin-bottom: var(--glacias-space-8); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Padding --- */
.p-0 { padding: 0; }
.p-4 { padding: var(--glacias-space-4); }
.p-6 { padding: var(--glacias-space-6); }
.p-8 { padding: var(--glacias-space-8); }
.py-4 { padding-top: var(--glacias-space-4); padding-bottom: var(--glacias-space-4); }
.py-8 { padding-top: var(--glacias-space-8); padding-bottom: var(--glacias-space-8); }
.py-12 { padding-top: var(--glacias-space-12); padding-bottom: var(--glacias-space-12); }
.px-4 { padding-left: var(--glacias-space-4); padding-right: var(--glacias-space-4); }
.px-6 { padding-left: var(--glacias-space-6); padding-right: var(--glacias-space-6); }

/* --- Width --- */
.w-full { width: 100%; }
.max-w-narrow { max-width: var(--glacias-content-width); }
.max-w-container { max-width: var(--glacias-max-width); }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- Border --- */
.border { border: 1px solid var(--glacias-border); }
.border-top { border-top: 1px solid var(--glacias-border); }
.border-bottom { border-bottom: 1px solid var(--glacias-border); }
.rounded-sm { border-radius: var(--glacias-radius-sm); }
.rounded-md { border-radius: var(--glacias-radius-md); }
.rounded-lg { border-radius: var(--glacias-radius-lg); }
.rounded-full { border-radius: var(--glacias-radius-full); }

/* --- Background --- */
.bg-primary { background-color: var(--glacias-primary); }
.bg-alt { background-color: var(--glacias-bg-alt); }
.bg-muted { background-color: var(--glacias-bg-muted); }

/* --- Visibility --- */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

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

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

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Print --- */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .breadcrumbs,
    .related-posts,
    .comments-area,
    .menu-toggle,
    .search-form,
    .glacias-pagination,
    .nav-links {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
