/* CSS Customizado para o Blog iNoveFast */

/* Variáveis CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --code-bg: #2d3748;
    --code-border: #4a5568;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.display-5 {
    font-weight: 700;
    line-height: 1.2;
}

.lead {
    font-size: 1.1rem;
    font-weight: 300;
}

/* Header customization */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navigation */
.navbar {
    border-bottom: 1px solid #dee2e6;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 0.375rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Article content styling */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.article-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

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

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

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background-color: var(--light-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.375rem 0.375rem 0;
}

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

/* Code styling */
.article-content pre {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

.article-content code {
    background-color: #e9ecef;
    color: #d63384;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-family: 'Courier New', Monaco, monospace;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Prism.js customizations */
pre[class*="language-"] {
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.line-numbers .line-numbers-rows {
    border-right: 1px solid #4a5568;
}

.toolbar {
    opacity: 1 !important;
}

.toolbar-item button {
    background: var(--primary-color) !important;
    border: none !important;
    color: white !important;
    border-radius: 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
}

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

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

/* Tables */
.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

.article-content th {
    background-color: var(--light-color);
    font-weight: 600;
}

/* Badges and tags */
.badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
}

/* Comments section */
.comments-section {
    border-top: 2px solid var(--light-color);
    padding-top: 2rem;
    margin-top: 3rem;
}

.comments-list .card {
    background-color: #fafafa;
}

/* Social sharing buttons */
.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-secondary:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
}

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

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

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

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 {
        font-size: 1.75rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Table of Contents */
#table-of-contents ul {
    list-style: none;
    padding-left: 0;
}

#table-of-contents li {
    padding: 0.25rem 0;
}

#table-of-contents a {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

#table-of-contents a:hover {
    color: var(--primary-color);
}

/* Alert customizations */
.alert {
    border: none;
    border-radius: 0.5rem;
}

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

.alert-success {
    background-color: #d1e7dd;
    color: #0a3622;
}

.alert-danger {
    background-color: #f8d7da;
    color: #58151c;
}

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

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

/* Button hover effects */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Loading animation for future use */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Custom scrollbar for code blocks */
pre::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: #2d3748;
}

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

pre::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Print styles */
@media print {
    .navbar,
    .comments-section,
    footer,
    .btn,
    .badge {
        display: none !important;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .article-content pre {
        background: #f8f9fa !important;
        border: 1px solid #dee2e6 !important;
        color: #212529 !important;
    }
}

/* Accessibility improvements */
.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 styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 1px solid #000;
    }
    
    .badge {
        border: 1px solid #000;
    }
}

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