/* style.css - نسخه کامل و نهایی */
/* ============================================
   Variables
============================================ */
:root {
    /* رنگ‌های اصلی */
    --primary-color: #0d6efd;
    --primary-dark: #084298;
    --primary-light: #e7f1ff;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    
    /* رنگ‌های خنثی */
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    --black: #000000;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* سایه‌ها */
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
    
    /* گوشه‌ها */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* تایپوگرافی */
    --font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --line-height: 1.8;
    
    /* انیمیشن */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Reset & Base Styles
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height);
    background: var(--light-color);
    color: var(--dark-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: right;
}

/* ============================================
   Typography
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--dark-color);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1.25rem;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.lead {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
}

.display-4 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.display-5 {
    font-size: clamp(1.65rem, 5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
}

.small {
    font-size: 0.875rem;
}

/* ============================================
   Utility Classes
============================================ */
.text-center { text-align: center; }
.text-start { text-align: right; }
.text-end { text-align: left; }
.text-white { color: var(--white); }
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
.text-primary { color: var(--primary-color); }
.text-muted { color: var(--gray-600); }
.text-success { color: var(--success-color); }
.text-info { color: var(--info-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.bg-primary { background-color: var(--primary-color); }
.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--light-color); }
.bg-dark { background-color: var(--dark-color); }
.bg-info { background-color: var(--info-color); }
.bg-success { background-color: var(--success-color); }

/* Margin & Padding */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; text-align: justify; }
.mb-5 { margin-bottom: 3rem; text-align: center; }

.me-1 { margin-left: 0.25rem; }
.me-2 { margin-left: 0.5rem; }
.me-3 { margin-left: 1rem; }
.me-4 { margin-left: 1.5rem; }
.me-5 { margin-left: 3rem; }

.ms-1 { margin-right: 0.25rem; }
.ms-2 { margin-right: 0.5rem; }
.ms-3 { margin-right: 1rem; }

.ms-auto { margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.px-1 { padding-right: 0.25rem; padding-left: 0.25rem; }
.px-2 { padding-right: 0.5rem; padding-left: 0.5rem; }
.px-3 { padding-right: 1rem; padding-left: 1rem; }
.px-4 { padding-right: 1.5rem; padding-left: 1.5rem; }
.px-5 { padding-right: 3rem; padding-left: 3rem; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; justify-content: space-between; }
.d-inline-flex { display: inline-flex; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-grow-1 { flex-grow: 1; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-stretch { align-items: stretch; }

.justify-content-center { justify-content: center; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

/* Gap */
.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

/* Grid Gap */
.g-0 { gap: 0; }
.g-1 { gap: 0.25rem; }
.g-2 { gap: 0.5rem; }
.g-3 { gap: 1rem; }
.g-4 { gap: 1.5rem; }
.g-5 { gap: 3rem; }

/* Width & Height */
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.vh-100 { height: 100vh; }

/* Border & Radius */
.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-circle { border-radius: 50%; }

.border-0 { border: none; }
.border { border: 1px solid var(--gray-300); }
.border-top { border-top: 1px solid var(--gray-300); }
.border-bottom { border-bottom: 1px solid var(--gray-300); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* List */
.list-unstyled {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Font Weight */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.fw-bolder { font-weight: 800; }

/* Opacity */
.opacity-75 { opacity: 0.75; }
.opacity-50 { opacity: 0.5; }
.opacity-25 { opacity: 0.25; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: var(--white);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem;
}

.badge-primary { background-color: var(--primary-color); }
.badge-success { background-color: var(--success-color); }
.badge-danger { background-color: var(--danger-color); }
.badge-warning { background-color: var(--warning-color); }

/* Alert */
.alert {
    position: relative;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-primary {
    color: #084298;
    background-color: #cfe2ff;
    border-color: #b6d4fe;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* ============================================
   Navigation
============================================ */
.navbar {
    padding: 1rem 0;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: var(--white);
    opacity: 0.9;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all var(--transition-fast);
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-toggler {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
}

.navbar-toggler span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--white);
    border-radius: 3px;
    transition: all var(--transition-normal);
}

.navbar-collapse {
    display: flex;
    flex-grow: 1;
}

/* ============================================
   Breadcrumb
============================================ */
.breadcrumb {
    padding: 0.75rem 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    display: flex;
    list-style: none;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--gray-600);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--gray-600);
}

/* ============================================
   Hero Section
============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    padding: clamp(4rem, 10vw, 2rem) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    pointer-events: none;
}

.hero h1 {
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p.lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.hero .btn {
    margin-top: 1rem;
}

/* ============================================
   Features Section - آیکن‌های زیر دکمه‌ها
============================================ */
.features {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.feature-item {
    padding: 1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    color: var(--white);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.feature-item:hover .feature-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.feature-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

/* ============================================
   Content Section
============================================ */
.content {
    padding: clamp(3rem, 8vw, 5rem) 0;
    background: var(--white);
}

/* ============================================
   Cards
============================================ */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    height: 100%;
    background: var(--white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.card-body {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card .fa-2x {
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform var(--transition-normal);
}

.card:hover .fa-2x {
    transform: scale(1.2);
}

.card-title {
    margin-bottom: 0.875rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.4;
}

.card-text {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0;
    flex-grow: 1;
    text-align: justify;
}

/* ============================================
   Real Prescription Upload Section - نسخه‌خوانی واقعی
============================================ */
.prescription-upload-section {
    background: var(--light-color);
}

.prescription-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.prescription-steps {
    display: flex;
    background: var(--light-color);
    padding: 0;
    margin: 0;
    list-style: none;
}

.prescription-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.prescription-step.active {
    border-bottom: 3px solid var(--primary-color);
    background: var(--white);
}

.prescription-step.completed {
    border-bottom: 3px solid var(--success-color);
}

.prescription-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--gray-300);
    color: var(--gray-600);
    border-radius: 50%;
    margin-left: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.prescription-step.active .prescription-step-number {
    background: var(--primary-color);
    color: var(--white);
}

.prescription-step.completed .prescription-step-number {
    background: var(--success-color);
    color: var(--white);
}

.prescription-step-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.prescription-content {
    padding: 2rem;
}

.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content.active {
    display: block;
}

/* Step 1: Upload */
.upload-area {
    border: 3px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-color);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.upload-area.dragover {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-text h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.upload-text p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.upload-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.preview-container {
    margin-top: 2rem;
    display: none;
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Step 2: Information */
.info-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control-custom {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Step 3: Review */
.review-summary {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    font-weight: 600;
    color: var(--gray-700);
}

.review-value {
    color: var(--dark-color);
}

.prescription-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--gray-700);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 3rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

/* ============================================
   Calculator Section - ماشین حساب هزینه
============================================ */
.calculator {
    background: var(--light-color);
}

.calc-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.calc-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.calc-option h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.calc-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.calc-option input[type="checkbox"],
.calc-option input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.calc-option select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calc-result {
    background: var(--primary-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-result h4 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-600);
}

/* ============================================
   Accordion
============================================ */
.accordion {
    margin: 2rem 0;
}

.accordion-item {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    width: 100%;
    padding: 1.25rem;
    background-color: var(--light-color);
    border: none;
    text-align: right;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-color);
}

.accordion-button:hover {
    background-color: var(--gray-200);
    color: var(--primary-color);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-bottom: 1px solid var(--gray-300);
}

.accordion-button::after {
    font-size: 1.25rem;
    transition: transform var(--transition-normal);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 1.5rem;
    background-color: var(--white);
    color: var(--gray-700);
    line-height: 1.7;
    text-align: justify;
}

/* ============================================
   Consult Form
============================================ */
.consult {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.consult h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.consult p.lead {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

/* فرم‌های floating label */
.form-floating {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-floating .form-control {
    height: calc(3.5rem + 2px);
    min-height: 3.5rem;
    padding: 1.625rem 1rem 0.625rem;
    line-height: 1.25;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-floating .form-control::placeholder {
    color: transparent;
}

.form-floating .form-control:focus {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    outline: none;
}

.form-floating > label {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    padding: 1.625rem 1rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 100% 0;
    transition: all var(--transition-fast);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.25;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: rgba(155, 155, 152, 0.9);
    padding-top: 1.20rem;
    padding-right: 0.75rem;
}

.needs-validation .form-control:invalid {
    border-color: var(--danger-color);
}

.was-validated .form-control:invalid {
    border-color: #ff6b6b;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ff6b6b;
    text-align: right;
    padding-right: 0.25rem;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

/* ============================================
   Buttons
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    user-select: none;
    font-size: 1rem;
    line-height: 1.5;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-light {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.btn-light:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.9);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

/* ============================================
   Footer
============================================ */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;

}

.social-links a {
    color: var(--white);
    text-decoration: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* ============================================
   Smart Chat Widget - چت بات هوشمند
============================================ */
.chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(13, 110, 253, 0.4);
}

.chat-container {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
}

.chat-container.open {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header h6 {
    margin: 0;
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.chat-status {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-close:hover {
    transform: scale(1.2);
}

.chat-body {
    padding: 1rem;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.chat-message.bot {
    background: var(--light-color);
    align-self: flex-start;
    border-bottom-right-radius: 5px;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-left-radius: 5px;
}

.chat-message p {
    margin: 0;
    font-size: 0.95rem;
}

.chat-message .time {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: left;
    margin-top: 0.25rem;
}

.chat-message.user .time {
    text-align: right;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quick-btn {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--dark-color);
}

.quick-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 25px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.chat-send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ============================================
   Images
============================================ */
.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Responsive Styles - بهبود چت و نسخه‌خوانی
============================================ */

/* موبایل (تا 768px) */
@media (max-width: 768px) {
    /* تایپوگرافی موبایل */
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.75rem;
        margin-top: 2rem;
    }
    
    .display-4 {
        font-size: 1.85rem;
    }
    
    /* نویگیشن موبایل */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        display: flex;
    }
    
    .navbar-collapse {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: var(--primary-color);
        padding: 1rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: var(--border-radius);
    }
    
    /* هیرو موبایل */
    .hero {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero h1 {
        text-align: center;
    }
    
    .hero p {
        text-align: justify;
        max-width: 100%;
    }
    
    .hero .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .hero .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* Features در موبایل */
    .features {
        padding-top: 1.5rem;
        margin-top: 2rem;
    }
    
    .features .row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature-item {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .feature-text {
        font-size: 0.8rem;
    }
    
    /* Chat Widget موبایل */
    .chat-widget {
        bottom: 15px;
        left: 15px;
    }
    
    .chat-toggle {
        width: 55px;
        height: 55px;
        font-size: 1.25rem;
    }
    
    .chat-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        bottom: auto;
    }
    
    .chat-container.open {
        animation: slideInUp 0.3s ease-out;
    }
    
    @keyframes slideInUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    /* Prescription Upload موبایل */
    .prescription-steps {
        flex-direction: column;
    }
    
    .prescription-step {
        border-right: none;
        border-bottom: 2px solid var(--gray-300);
        text-align: right;
        padding: 0.75rem 1rem;
    }
    
    .prescription-step.active,
    .prescription-step.completed {
        border-right: none;
        border-bottom: 2px solid var(--primary-color);
    }
    
    .prescription-step-number {
        margin-left: 0;
        margin-right: 0.5rem;
    }
    
    .prescription-content {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Calculator موبایل */
    .calc-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    /* Cards موبایل */
    .col-md-6.col-lg-4 {
        margin-bottom: 30px;
    }
    
	.col-6 {
    flex: 0 0 auto;
    width: 100%;
	{
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    /* Accordion موبایل */
    .accordion-button {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .accordion-body {
        padding: 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Form موبایل */
    .consult {
        padding: 2.5rem 1rem;
    }
    
    .consult h3 {
        font-size: 1.5rem;
    }
    
    .form-floating .form-control {
        height: 3.25rem;
        font-size: 0.95rem;
    }
    
    .consult button[type="submit"] {
        width: 100%;
    }
    
    .upload-actions,
    .prescription-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .upload-btn,
    .btn-secondary,
    .btn-success {
        width: 100%;
    }
    
    /* Footer موبایل */
    .footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
}

/* تبلت (769px تا 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .hero {
        padding: 4rem 0;
    }
    
    .features .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .features .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .chat-container {
        width: 320px;
        height: 450px;
    }
    
    .prescription-container,
    .calc-container {
        max-width: 90%;
    }
    
    .demo-container,
    .calc-container {
        gap: 2rem;
    }
}

/* دسکتاپ (993px به بالا) */
@media (min-width: 993px) {
    .features .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .features .col-md-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .chat-container {
        width: 380px;
        height: 550px;
    }
    
    .text-lg-start { text-align: right; }
    .text-lg-end { text-align: left; }
    .text-lg-center { text-align: center; }
    
    .btn-group {
        justify-content: flex-start;
    }
    
    .navbar-nav {
        gap: 1rem;
    }
    
    .hero .btn-group {
        justify-content: flex-start;
    }
}

/* دسکتاپ بزرگ (1200px به بالا) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
}

/* ============================================
   Print Styles
============================================ */
@media print {
    .hero,
    .consult,
    .navbar,
    .social-links,
    .btn,
    form,
    .chat-widget,
    .calculator,
    .features {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .content {
        padding: 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ============================================
   Accessibility
============================================ */
@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;
    }
    
    .btn:hover,
    .card:hover,
    .nav-link:hover,
    .feature-item:hover,
    .chat-message {
        transform: none;
    }
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

.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;
}

/* ============================================
   Container
============================================ */
.container {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ============================================
   Custom Animations
============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse-animation {
    animation: pulse 2s infinite;
}