/**
 * استایل‌های سفارشی قالب مدرسه
 * School Theme Custom CSS
 */

/* ===== متغیرهای CSS ===== */
:root {
    --primary-color: #e11d48;
    --primary-dark: #be185d;
    --primary-light: #fdf2f8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0ea5e9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    --font-family: 'dana', 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Dark mode variables */
.dark {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --border-color: #334155;
    --border-light: #475569;
}

/* Override base to ensure font applies globally */
body, input, textarea, select, button {
    font-family: var(--font-family);
}

/* Dark-mode default for inputs */
.dark input,
.dark textarea,
.dark select {
  background-color: #3A3A3C;
  opacity: 0.6;
}

/* ===== Reset و Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6,button,input,textarea,select { font-family: var(--font-family); }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

strong, b {
    font-weight: 600;
    color: var(--text-primary);
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section-sm {
    padding: var(--spacing-xl) 0;
}

.section-lg {
    padding: 4rem 0;
}

/* ===== Grid System ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-sm) * -1);
}

.col {
    flex: 1;
    padding: 0 var(--spacing-sm);
}

.col-auto {
    flex: 0 0 auto;
}

.col-12 { flex: 0 0 100%; }
.col-11 { flex: 0 0 91.666667%; }
.col-10 { flex: 0 0 83.333333%; }
.col-9 { flex: 0 0 75%; }
.col-8 { flex: 0 0 66.666667%; }
.col-7 { flex: 0 0 58.333333%; }
.col-6 { flex: 0 0 50%; }
.col-5 { flex: 0 0 41.666667%; }
.col-4 { flex: 0 0 33.333333%; }
.col-3 { flex: 0 0 25%; }
.col-2 { flex: 0 0 16.666667%; }
.col-1 { flex: 0 0 8.333333%; }

@media (min-width: 768px) {
    .col-md-12 { flex: 0 0 100%; }
    .col-md-11 { flex: 0 0 91.666667%; }
    .col-md-10 { flex: 0 0 83.333333%; }
    .col-md-9 { flex: 0 0 75%; }
    .col-md-8 { flex: 0 0 66.666667%; }
    .col-md-7 { flex: 0 0 58.333333%; }
    .col-md-6 { flex: 0 0 50%; }
    .col-md-5 { flex: 0 0 41.666667%; }
    .col-md-4 { flex: 0 0 33.333333%; }
    .col-md-3 { flex: 0 0 25%; }
    .col-md-2 { flex: 0 0 16.666667%; }
    .col-md-1 { flex: 0 0 8.333333%; }
}

@media (min-width: 1024px) {
    .col-lg-12 { flex: 0 0 100%; }
    .col-lg-11 { flex: 0 0 91.666667%; }
    .col-lg-10 { flex: 0 0 83.333333%; }
    .col-lg-9 { flex: 0 0 75%; }
    .col-lg-8 { flex: 0 0 66.666667%; }
    .col-lg-7 { flex: 0 0 58.333333%; }
    .col-lg-6 { flex: 0 0 50%; }
    .col-lg-5 { flex: 0 0 41.666667%; }
    .col-lg-4 { flex: 0 0 33.333333%; }
    .col-lg-3 { flex: 0 0 25%; }
    .col-lg-2 { flex: 0 0 16.666667%; }
    .col-lg-1 { flex: 0 0 8.333333%; }
}

/* ===== Components ===== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
}

.btn-ghost:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.btn-block {
    width: 100%;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: btn-spin 1s linear infinite;
    margin-right: var(--spacing-xs);
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Cards */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.form-control {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

.error-message {
    font-size: var(--font-size-sm);
    color: var(--danger-color);
    margin-top: var(--spacing-xs);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: left 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-left: 2.5rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-success {
    background-color: #dcfce7;
    color: var(--success-color);
}

.badge-warning {
    background-color: #fef3c7;
    color: var(--warning-color);
}

.badge-danger {
    background-color: #fee2e2;
    color: var(--danger-color);
}

.badge-info {
    background-color: #dbeafe;
    color: var(--info-color);
}

/* Alerts */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: var(--spacing-lg);
}

.alert-primary {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

.alert-success {
    background-color: #dcfce7;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--info-color);
    color: #1e40af;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

/* Navigation */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--font-size-sm);
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin: 0 var(--spacing-xs);
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
}

.table th,
.table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.table-striped tbody tr:nth-child(odd) {
    background-color: var(--bg-secondary);
}

.table-bordered {
    border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
}

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

/* Spacing */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--spacing-xs) !important; }
.m-2 { margin: var(--spacing-sm) !important; }
.m-3 { margin: var(--spacing-md) !important; }
.m-4 { margin: var(--spacing-lg) !important; }
.m-5 { margin: var(--spacing-xl) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }
.mt-5 { margin-top: var(--spacing-xl) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mb-5 { margin-bottom: var(--spacing-xl) !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: var(--spacing-xs) !important; }
.mr-2 { margin-right: var(--spacing-sm) !important; }
.mr-3 { margin-right: var(--spacing-md) !important; }
.mr-4 { margin-right: var(--spacing-lg) !important; }
.mr-5 { margin-right: var(--spacing-xl) !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: var(--spacing-xs) !important; }
.ml-2 { margin-left: var(--spacing-sm) !important; }
.ml-3 { margin-left: var(--spacing-md) !important; }
.ml-4 { margin-left: var(--spacing-lg) !important; }
.ml-5 { margin-left: var(--spacing-xl) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-xs) !important; }
.p-2 { padding: var(--spacing-sm) !important; }
.p-3 { padding: var(--spacing-md) !important; }
.p-4 { padding: var(--spacing-lg) !important; }
.p-5 { padding: var(--spacing-xl) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--spacing-xs) !important; }
.pt-2 { padding-top: var(--spacing-sm) !important; }
.pt-3 { padding-top: var(--spacing-md) !important; }
.pt-4 { padding-top: var(--spacing-lg) !important; }
.pt-5 { padding-top: var(--spacing-xl) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--spacing-xs) !important; }
.pb-2 { padding-bottom: var(--spacing-sm) !important; }
.pb-3 { padding-bottom: var(--spacing-md) !important; }
.pb-4 { padding-bottom: var(--spacing-lg) !important; }
.pb-5 { padding-bottom: var(--spacing-xl) !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: var(--spacing-xs) !important; }
.pr-2 { padding-right: var(--spacing-sm) !important; }
.pr-3 { padding-right: var(--spacing-md) !important; }
.pr-4 { padding-right: var(--spacing-lg) !important; }
.pr-5 { padding-right: var(--spacing-xl) !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: var(--spacing-xs) !important; }
.pl-2 { padding-left: var(--spacing-sm) !important; }
.pl-3 { padding-left: var(--spacing-md) !important; }
.pl-4 { padding-left: var(--spacing-lg) !important; }
.pl-5 { padding-left: var(--spacing-xl) !important; }

/* Text utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.text-xs { font-size: var(--font-size-xs) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-base { font-size: var(--font-size-base) !important; }
.text-lg { font-size: var(--font-size-lg) !important; }
.text-xl { font-size: var(--font-size-xl) !important; }
.text-2xl { font-size: var(--font-size-2xl) !important; }
.text-3xl { font-size: var(--font-size-3xl) !important; }
.text-4xl { font-size: var(--font-size-4xl) !important; }

.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

/* Background utilities */
.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-tertiary { background-color: var(--bg-tertiary) !important; }

/* Border utilities */
.border { border: 1px solid var(--border-color) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-right { border-right: 1px solid var(--border-color) !important; }
.border-left { border-left: 1px solid var(--border-color) !important; }

.rounded { border-radius: var(--radius-md) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: 50% !important; }

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

/* Flex utilities */
.flex-row { flex-direction: row !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column { flex-direction: column !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

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

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

.flex-1 { flex: 1 !important; }
.flex-auto { flex: auto !important; }
.flex-none { flex: none !important; }

/* Position utilities */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

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

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-in-out; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease-out; }
.animate-fadeInDown { animation: fadeInDown 0.6s ease-out; }
.animate-slideIn { animation: slideIn 0.3s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 1s infinite; }

/* Hover animations */
.hover-scale:hover { transform: scale(1.05); }
.hover-lift:hover { transform: translateY(-2px); }
.hover-rotate:hover { transform: rotate(5deg); }

/* ===== Responsive Design ===== */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .row {
        margin: 0 calc(var(--spacing-xs) * -1);
    }
    
    .col {
        padding: 0 var(--spacing-xs);
    }
    
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    h3 { font-size: var(--font-size-xl); }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Mobile utilities */
    .d-sm-none { display: none !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-inline-flex { display: inline-flex !important; }
    
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
    .text-sm-right { text-align: right !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet utilities */
    .d-md-none { display: none !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-inline-flex { display: inline-flex !important; }
}

@media (min-width: 1024px) {
    /* Desktop utilities */
    .d-lg-none { display: none !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-inline-flex { display: inline-flex !important; }
}

/* Responsive overrides */
@media (min-width: 768px) {
  .md\:text-5xl { line-height: 1.5 !important; }
}

/* ===== Print Styles ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
        box-shadow: none !important;
    }
    
    .btn {
        border: 1px solid #ccc !important;
        background: transparent !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
        color: black !important;
    }
}

/* ===== Accessibility ===== */
.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;
}

.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

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

/* ===== Custom Theme Styles ===== */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Notification */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md);
    min-width: 300px;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-color: var(--success-color);
}

.notification-error {
    border-color: var(--danger-color);
}

.notification-warning {
    border-color: var(--warning-color);
}

.notification-info {
    border-color: var(--info-color);
}

/* Tooltip */
.tooltip {
    position: absolute;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

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

.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;
}

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

/* Lightbox */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.lb-overlay.open { display: flex; }
.lb-dialog { position: relative; max-width: 90vw; max-height: 90vh; }
.lb-image { max-width: 90vw; max-height: 90vh; display: block; border-radius: 0.75rem; }
.lb-control { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 9999px; cursor: pointer; display: grid; place-items: center; font-size: 22px; }
.lb-prev { right: 100%; margin-right: 12px; }
.lb-next { left: 100%; margin-left: 12px; }
.lb-close { top: -48px; right: 0; transform: none; background: rgba(255,255,255,0.25); font-size: 20px; width: 36px; height: 36px; }
.lb-no-scroll { overflow: hidden !important; }

/* Contact form readability */
#contact-form input[type="text"],
#contact-form input[type="tel"],
#contact-form input[type="email"],
#contact-form input[type="checkbox"],
#contact-form textarea {
  color: #0f172a; /* slate-900 */
}
.dark #contact-form input[type="text"],
.dark #contact-form input[type="tel"],
.dark #contact-form input[type="email"],
.dark #contact-form textarea {
  color: #e2e8f0; /* slate-200 */
  background-color: #0b1220; /* near slate-950 */
  border-color: #1f2937; /* darker border */
}
#contact-form ::placeholder { color: #64748b; }
.dark #contact-form ::placeholder { color: #94a3b8; }

/* Auto modal */
.auto-modal-overlay { background: rgba(0,0,0,0.5); animation: fadeIn 0.2s ease-out; }
.auto-modal-hide { animation: fadeOut 0.2s ease-in forwards; }
@keyframes fadeOut { to { opacity: 0; } }

/* ===== Custom Select (theme) ===== */
.custom-select{position:relative;display:inline-block}
.custom-select select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-color:var(--bg-primary);color:var(--text-primary);padding:0.5rem 2.5rem 0.5rem 0.75rem;border:1px solid var(--border-color);border-radius:var(--radius-xl);font-size:var(--font-size-sm);line-height:1.5;transition:all var(--transition-fast);min-width:10rem}
.custom-select select:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary-color) 25%, transparent)}
.custom-select .cs-arrow{pointer-events:none;position:absolute;inset-inline-start:0.6rem;top:50%;transform:translateY(-50%);color:var(--text-muted)}
.custom-select select:hover{border-color:var(--primary-color)}
.dark .custom-select select{background-color:#0b1220;border-color:var(--border-color);color:var(--text-secondary)}
/* compact size */
.custom-select.sm select{padding:0.35rem 2.25rem 0.35rem 0.6rem;font-size:12.5px}
/* width helper */
.custom-select.w-40 select{min-width:10rem}

/* Enhanced dropdown mode */
.custom-select.enhanced select{position:absolute;inset:0;opacity:0;pointer-events:none}
.custom-select .cs-display{display:inline-flex;align-items:center;gap:.5rem;background-color:var(--bg-primary);color:var(--text-primary);padding:0.5rem 2.25rem 0.5rem 0.75rem;border:1px solid var(--border-color);border-radius:var(--radius-xl);font-size:var(--font-size-sm);line-height:1.5;cursor:pointer;transition:all var(--transition-fast);min-width:10rem}
.custom-select.sm .cs-display{padding:0.35rem 2.1rem 0.35rem 0.6rem;font-size:12.5px}
.custom-select .cs-display:hover{border-color:var(--primary-color)}
.custom-select .cs-display:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary-color) 25%, transparent)}
.custom-select.open .cs-arrow{color:var(--primary-color)}

.custom-select .cs-dropdown{position:absolute;z-index:50;inset-inline:0;top:calc(100% + 6px);background:var(--bg-primary);border:1px solid var(--border-color);border-radius:12px;box-shadow:var(--shadow-lg);padding:6px;display:none;max-height:260px;overflow:auto}
.custom-select.open .cs-dropdown{display:block}
.custom-select .cs-option{display:flex;align-items:center;gap:.5rem;border-radius:10px;padding:8px 10px;color:var(--text-primary);cursor:pointer;transition:background var(--transition-fast), color var(--transition-fast)}
.custom-select .cs-option:hover{background:var(--bg-secondary);color:var(--primary-color)}
.custom-select .cs-option[aria-selected="true"]{background:color-mix(in srgb, var(--primary-color) 8%, transparent);color:var(--primary-color);font-weight:600}
.custom-select .cs-empty{padding:10px;color:var(--text-muted);font-size:12.5px}
.dark .custom-select .cs-dropdown{background:#0b1220;border-color:var(--border-color)}
.dark .custom-select .cs-option:hover{background:#111a2c}





aside.hidden.lg\:block.sticky-sidebar.fixed.left-6.top-1\/2.transform.-translate-y-1\/2.w-72.bg-white.dark\:bg-slate-900.rounded-2xl.border.border-slate-200.dark\:border-slate-800.p-6.shadow-lg {
    z-index: 999999 !important;
}