/* ==========================================
   VENDORGUARD BLOG - SHARED STYLES
   ========================================== */

/* Root Colors */
:root {
    --primary-color: #2b6df6;
    --primary-dark: #0f2a63;
    --secondary-color: #667eea;
    --accent-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-muted: #666;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; letter-spacing: -0.5px; }
h2 { font-size: 1.75rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.8;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Navbar */
.public-navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main Content */
main {
    min-height: 60vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

article {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 3rem 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    article {
        padding: 2rem 1.5rem;
    }
}

/* Article Content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.article-content h2 {
    color: var(--primary-dark);
    font-weight: 700;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin: 2.5rem 0 1.25rem;
}

.article-content h3 {
    color: var(--primary-dark);
    font-weight: 600;
    margin: 1.75rem 0 1rem;
}

.article-content h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

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

.article-content li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.article-content strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Code Block */
code {
    background: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #d63384;
}

pre {
    background: #f5f5f5;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    color: var(--text-dark);
    padding: 0;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: var(--primary-dark);
    color: white;
}

.table thead th {
    border-color: var(--primary-dark);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

.table tbody td {
    border-color: #e9ecef;
    padding: 1rem;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Article Header */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-size: 2.5rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-meta i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }

    .article-meta {
        gap: 1rem;
    }
}

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

.alert-info {
    background-color: #e7f3ff;
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

.alert-info i {
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-warning i {
    color: var(--warning-color);
    margin-right: 0.75rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-success i {
    color: var(--success-color);
    margin-right: 0.75rem;
}

.alert-success strong {
    color: inherit;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 109, 246, 0.3);
}

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

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

.btn-lg {
    padding: 0.875rem 2.25rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
}

.badge.bg-light {
    background: #f0f2f5 !important;
}

/* CTA Sections */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    margin: 3rem 0;
    text-align: center;
}

.cta-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

footer h6 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

footer .list-unstyled {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

footer .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

/* Breadcrumbs */
.breadcrumb-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

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

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

.breadcrumb-nav span {
    color: var(--border-color);
    margin: 0 0.25rem;
}

/* Back to Blog */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-to-blog:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

.back-to-blog i {
    transition: transform 0.2s ease;
}

.back-to-blog:hover i {
    transform: translateX(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    p { font-size: 0.95rem; }

    .article-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .alert-info .btn {
        display: none;
    }

    article {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    img {
        max-width: 100%;
    }
}
