/* Custom CSS for Bizagi Blog */

/* Global Styles - Persian RTL */
body {
    font-family: 'Vazirmatn', 'Estedad', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
    font-weight: 400;
}

/* RTL Support */
.navbar-nav {
    flex-direction: row-reverse;
}

.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

.ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

.me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

.me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

.me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

.text-md-end {
    text-align: left !important;
}

.text-md-start {
    text-align: right !important;
}

/* Persian Font Support */
.display-4,
.display-5,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazirmatn', 'Estedad', 'Tahoma', 'Arial', sans-serif;
    font-weight: 700;
    line-height: 1.4;
}

/* Beautiful Persian Typography */
.navbar-brand {
    font-family: 'Vazirmatn', 'Estedad', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
}

/* Internal Links Styling */
.post-content a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.post-content a:hover {
    color: #0a58ca;
    border-bottom-color: #0d6efd;
    transform: translateY(-1px);
}

.post-content ul li {
    margin-bottom: 0.75rem;
}

.post-content ul li a {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: rgba(13, 110, 253, 0.1);
    transition: all 0.3s ease;
}

.post-content ul li a:hover {
    background-color: rgba(13, 110, 253, 0.2);
    transform: translateX(5px);
}

.card-title {
    font-family: 'Vazirmatn', 'Estedad', sans-serif;
    font-weight: 600;
    line-height: 1.5;
}

.lead {
    font-family: 'Vazirmatn', 'Estedad', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.7;
}

.btn {
    font-family: 'Vazirmatn', 'Estedad', sans-serif;
    font-weight: 500;
}

.badge {
    font-family: 'Vazirmatn', 'Estedad', sans-serif;
    font-weight: 500;
}

.main-content {
    margin-top: 76px; /* Account for fixed navbar */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Code Blocks */
pre {
    background-color: #2d3748;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    border: 1px solid #4a5568;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* Syntax Highlighting for SQL */
.language-sql {
    color: #e2e8f0;
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Post Content */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.post-content h3 {
    color: #4a5568;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.post-content h4 {
    color: #718096;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1.25rem;
    color: #4a5568;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .main-content {
        margin-top: 60px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

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

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Code Copy Button */
.code-block {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Print Styles */
@media print {
    .navbar, footer, .btn {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
