/* Custom styles for the blog */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fafafa;
}

/* Hover effect for cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
}

/* Article content styling */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.article-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    color: var(--dark-color);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.article-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content li:last-child {
    margin-bottom: 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    font-style: italic;
    color: #495057;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    left: 0.5rem;
    top: -1rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.article-content pre {
    background-color: #2d2d2d;
    color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.article-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-family: 'Courier New', monospace;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Link styling */
.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    font-weight: 500;
}

.article-content a:hover {
    color: #0b5ed7;
    border-bottom-color: currentColor;
}

.article-content .internal-link {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    background: linear-gradient(to right, currentColor, currentColor) no-repeat left bottom;
    background-size: 0% 1px;
    transition: background-size 0.3s ease;
}

.article-content .internal-link:hover {
    background-size: 100% 1px;
}

.article-content .external-link {
    color: var(--success-color);
    font-weight: 500;
}

.article-content .external-link:hover {
    color: #146c43;
    border-bottom-color: currentColor;
}

.article-content .external-link i {
    font-size: 0.7em;
    margin-left: 3px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.article-content .external-link:hover i {
    transform: translate(2px, -2px);
}

/* Code styling */
.article-content code {
    background-color: #f1f3f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #e83e8c;
    font-family: 'Courier New', monospace;
    border: 1px solid #dee2e6;
}

/* Bold and italic styling */
.article-content strong {
    font-weight: 700;
    color: #212529;
}

.article-content em {
    font-style: italic;
    color: #495057;
}

/* Pagination styling */
.pagination {
    gap: 5px;
}

.page-link {
    border-radius: 8px !important;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(13, 110, 253, 0.2);
}

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

.page-item.disabled .page-link {
    color: var(--secondary-color);
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
    transform: none;
    box-shadow: none;
}

/* Responsive typography */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .article-content {
        font-size: 1rem;
        padding: 1.5rem;
    }
    
    .article-content h1 {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content h4 {
        font-size: 1.1rem;
    }
    
    .article-content blockquote {
        padding: 0.75rem 1rem;
    }
    
    .article-content blockquote::before {
        font-size: 3rem;
        top: -0.5rem;
    }
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Badge styling */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 0.5rem 1rem;
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    transition: color 0.3s ease;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

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

/* Social links hover effect */
.social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

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

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Search form styling */
.input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group .btn-outline-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hero section */
.bg-light {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
}

.bg-light .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, #1e1e2f 0%, #2d2d3f 100%) !important;
}

/* About page styling */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content section {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.about-content .divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    margin: 1rem auto;
}

/* Contact page styling */
.contact-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    height: 100%;
}

.contact-info a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Search results styling */
.search-results .bg-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

/* Alert styling */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Button styling */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
    border: none;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.3);
}

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

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

/* Card styling */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card-title a {
    color: var(--dark-color) !important;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-color) !important;
}

/* Tooltip styling */
[title] {
    position: relative;
    cursor: help;
}

/* Animation for page transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .pagination,
    .social-links {
        display: none !important;
    }
    
    .article-content {
        box-shadow: none;
        padding: 0;
    }
    
    .article-content a {
        color: black;
        text-decoration: underline;
    }
}