/* Enterprise Solutions High-End CSS - 100% Robust & Framework-Independent */
:root {
    --bg: #07090e;
    --surface: #0d121d;
    --surface-card: #101623;
    --border: #1e2638;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

body {
    background-color: var(--bg) !important;
    color: #f1f5f9 !important;
    overflow-x: hidden;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    width: 100%;
    min-height: 100vh;
}

/* Background Grids & Ambient Aura */
.bg-grid-pattern {
    background-size: 32px 32px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.brand-ambient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 550px;
    pointer-events: none;
    z-index: 0;
}

.glass-panel {
    background: rgba(13, 18, 29, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(16, 22, 35, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Layout Utilities */
.container {
    max-width: 1150px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    position: relative;
    z-index: 10;
}

.header-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

@media (max-width: 768px) {
    .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-cols-12 { display: flex; flex-direction: column; }
}

@media (max-width: 480px) {
    .grid-cols-2 { grid-template-columns: 1fr; }
}

/* Typography & Sizing - Responsive Fluid Hierarchy (Auto Scales Smoothly Across Devices) */
h1, .h1, .enterprise-hero-title {
    font-size: clamp(1.35rem, 3.5vw, 2.35rem) !important;
    font-weight: 900 !important;
    line-height: 1.38 !important;
    letter-spacing: -0.02em;
    color: #ffffff;
    word-break: keep-all;
    overflow-wrap: break-word;
}

h2, .h2, .section-title, .section-h2-single {
    font-size: clamp(1.15rem, 2.5vw, 1.75rem) !important;
    font-weight: 800 !important;
    line-height: 1.42 !important;
    letter-spacing: -0.01em;
    color: #ffffff;
    word-break: keep-all;
    overflow-wrap: break-word;
}

h3, .h3 {
    font-size: clamp(0.95rem, 2vw, 1.3rem) !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: #f8fafc;
    word-break: keep-all;
    overflow-wrap: break-word;
}

@media (max-width: 640px) {
    h1, .h1, .enterprise-hero-title {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
    }
    h2, .h2, .section-title, .section-h2-single {
        font-size: 1.15rem !important;
        line-height: 1.4 !important;
    }
    .badge-pill {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.75rem !important;
    }
}

p.lead {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.8;
}

.font-mono, pre, code {
    font-family: 'JetBrains Mono', monospace !important;
    direction: ltr !important;
    text-align: left !important;
}

/* Cards & Badges */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #cbd5e1;
}

.brand-icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem auto;
    border-radius: 1.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 18, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn:active { transform: scale(0.98); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Form Controls */
.form-input, .form-textarea, .form-select {
    width: 100%;
    background: rgba(3, 7, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.875rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    outline: none;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: #3b82f6;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.375rem;
}

/* Simulator Output Rows */
.res-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}
