/* ==================== XINDUS DESIGN SYSTEM - UTILITIES ==================== */
/* Helper Classes and Responsive Breakpoints */

/* ========================================================================== */
/*                             UTILITY CLASSES                                 */
/* ========================================================================== */

/* ========== DISPLAY ========== */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* ========== FLEXBOX ========== */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

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

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

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ========== TEXT ALIGNMENT ========== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ========== MARGINS ========== */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ========== PADDING ========== */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* ========== WIDTH ========== */
.w-full { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }
.max-w-xl { max-width: 1000px; }
.max-w-2xl { max-width: 1200px; }

/* ========== POSITION ========== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ========== OVERFLOW ========== */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ========== VISIBILITY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ========================================================================== */
/*                           RESPONSIVE BREAKPOINTS                            */
/* ========================================================================== */

/* ========== TABLET (max-width: 992px) ========== */
@media (max-width: 992px) {
    /* Navigation */
    .navbar-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .nav-btn-outline,
    .nav-btn-secondary {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }

    /* Footer */
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    /* Utilities */
    .hide-tablet {
        display: none !important;
    }
}

/* ========== MOBILE LANDSCAPE (max-width: 768px) ========== */
@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        padding: var(--space-3) var(--space-5);
    }

    .nav-btn-outline {
        display: none;
    }

    .nav-btn-secondary {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    /* Footer */
    .footer {
        padding: 40px 20px 30px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-3) var(--space-5);
    }

    /* Section */
    .section {
        padding: var(--space-12) var(--space-5);
    }

    /* Container */
    .container {
        padding: 0 var(--space-5);
    }

    /* Typography */
    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    /* Utilities */
    .hide-mobile {
        display: none !important;
    }
}

/* ========== MOBILE PORTRAIT (max-width: 480px) ========== */
@media (max-width: 480px) {
    /* Navigation */
    .navbar {
        padding: var(--space-3) var(--space-4);
    }

    .nav-btn-outline,
    .nav-btn-secondary,
    .nav-cta {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    /* Typography */
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    /* Cards */
    .card {
        padding: var(--space-6);
    }

    /* Badges */
    .badge {
        padding: var(--space-1) var(--space-3);
        font-size: var(--text-xs);
    }

    /* Utilities */
    .hide-sm {
        display: none !important;
    }
}

/* ========== TOUCH TARGET OPTIMIZATION ========== */
@media (hover: none) and (pointer: coarse) {
    .navbar-menu a,
    .footer-column a,
    .footer-social a,
    .btn,
    .nav-cta,
    .nav-btn-outline,
    .nav-btn-secondary {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .navbar,
    .mobile-menu,
    .footer-social,
    .btn,
    .nav-cta {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}
