/* ============================================
   TUTORIAL PAGE STYLING
   Mobile-first, responsive design for tutorial/how-to pages
   ============================================ */

/* Import Source Code Pro voor code blocks */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600&display=swap');

/* Container en Layout */
.tutorial-page-wrapper {
    background-color: #ffffff !important;
    min-height: 100vh;
}

/* Mobile: Force white background */
@media (max-width: 767px) {
    .tutorial-page-wrapper {
        background-color: #ffffff !important;
    }
    
    body.tutorial-page,
    body.single-tutorial {
        background-color: #ffffff !important;
    }
}

.tutorial-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Mobile: Full width with padding */
@media (max-width: 767px) {
    .tutorial-container {
        max-width: 100%;
        padding: 0;
    }
    
    .tutorial-main-content {
        padding: 15px;
    }
}

/* Breadcrumb */
.tutorial-breadcrumb {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
    padding: 10px 0;
    background-color: #ffffff !important;
}

/* Mobile: White background for breadcrumb */
@media (max-width: 767px) {
    .tutorial-breadcrumb {
        background-color: #ffffff !important;
        padding: 10px 15px;
        margin-left: -15px;
        margin-right: -15px;
    }
}

.tutorial-breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.tutorial-breadcrumb a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.tutorial-breadcrumb .separator {
    margin: 0 8px;
    color: #adb5bd;
}

.tutorial-breadcrumb .current {
    color: #495057;
}

/* Layout Grid - Mobile First */
.tutorial-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Desktop: Sidebar layout */
@media (min-width: 992px) {
    .tutorial-layout {
        grid-template-columns: 1fr 350px;
        gap: 40px;
    }
}

/* Copy Page Button */
.copy-page-section {
    text-align: right;
    margin-bottom: 15px;
}

.copy-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-page-btn:hover {
    background-color: #f8f9fa;
    border-color: #0066cc;
    color: #0066cc;
}

.copy-page-btn.copied {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

/* Main Content */
.tutorial-main-content {
    min-width: 0; /* Prevents overflow issues */
}

.tutorial-article {
    background: #ffffff;
}

/* Titel */
.tutorial-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #212529 !important;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .tutorial-title {
        font-size: 40px;
    }
}

/* Content Styling */
.tutorial-content {
    font-size: 16px;
    line-height: 1.8;
    color: #212529 !important;
}

.tutorial-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #212529;
}

.tutorial-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #343a40;
}

.tutorial-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: #495057;
}

.tutorial-content p {
    margin-bottom: 16px;
}

.tutorial-content ul,
.tutorial-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.tutorial-content li {
    margin-bottom: 8px;
}

.tutorial-content a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.tutorial-content a:hover {
    border-bottom-color: #0066cc;
}

/* Code Blocks - as in example */
.tutorial-content code {
    font-family: 'Source Code Pro', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    background-color: #f6f8fa;
    color: #e83e8c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}

.tutorial-content pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tutorial-content pre code {
    font-family: 'Source Code Pro', 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.6;
}

/* Code syntax highlighting kleuren */
.tutorial-content .code-comment {
    color: #6a9955;
    font-style: italic;
}

.tutorial-content .code-keyword {
    color: #569cd6;
}

.tutorial-content .code-string {
    color: #ce9178;
}

.tutorial-content .code-function {
    color: #dcdcaa;
}

/* Highlight boxes */
.tutorial-content .highlight-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.tutorial-content .info-box {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.tutorial-content .warning-box {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Images */
.tutorial-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Tables */
.tutorial-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.tutorial-content table th,
.tutorial-content table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.tutorial-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

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

/* Expert Endorsement Badge */
.expert-endorsement {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 16px 20px;
    margin: 30px 0;
    border-radius: 6px;
    color: #155724;
    line-height: 1.6;
}

.expert-endorsement svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #28a745;
}

.expert-endorsement span {
    font-size: 15px;
    font-weight: 500;
}

/* Social Sharing Section */
.social-sharing {
    margin: 40px 0;
    padding: 24px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.social-sharing h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #212529;
}

.social-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.social-btn.linkedin {
    background-color: #0077b5;
}

.social-btn.linkedin:hover {
    background-color: #006399;
}

.social-btn.twitter {
    background-color: #1da1f2;
}

.social-btn.twitter:hover {
    background-color: #0d8bd9;
}

.social-btn.facebook {
    background-color: #1877f2;
}

.social-btn.facebook:hover {
    background-color: #0d65d9;
}

.social-btn.reddit {
    background-color: #ff4500;
}

.social-btn.reddit:hover {
    background-color: #e03d00;
}

.social-btn.email {
    background-color: #6c757d;
}

.social-btn.email:hover {
    background-color: #5a6268;
}

/* Navigation Buttons */
.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
    gap: 20px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-btn:hover {
    background-color: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.2);
}

.nav-btn .nav-arrow {
    font-size: 18px;
}

.nav-next {
    margin-left: auto;
}

@media (max-width: 576px) {
    .tutorial-navigation {
        flex-direction: column;
    }
    
    .nav-next {
        margin-left: 0;
    }
}

/* Keep Reading Section */
.keep-reading-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #dee2e6;
}

.keep-reading-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #212529;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-article-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s;
}

.related-article-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.related-article-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #212529;
}

.read-more-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* ============================================
   SIDEBAR STYLING
   ============================================ */

.tutorial-sidebar {
    /* Mobile: sidebar appears below content */
    background-color: #ffffff !important;
}

/* Mobile: White background for sidebar widgets */
@media (max-width: 991px) {
    .tutorial-sidebar {
        background-color: #ffffff !important;
        padding: 20px 15px;
        margin-left: -15px;
        margin-right: -15px;
    }
}

@media (min-width: 992px) {
    .tutorial-sidebar {
        position: sticky;
        top: 20px;
        align-self: start;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;
        /* Smooth scrolling within sidebar */
        scroll-behavior: smooth;
    }
    
    /* Hide scrollbar but keep functionality */
    .tutorial-sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .tutorial-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .tutorial-sidebar::-webkit-scrollbar-thumb {
        background: #dee2e6;
        border-radius: 3px;
    }
    
    .tutorial-sidebar::-webkit-scrollbar-thumb:hover {
        background: #adb5bd;
    }
}

/* CTA Box Widget */
.cta-box-widget,
.cta-box {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 100px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

/* Mobile: Remove background */
@media (max-width: 767px) {
    .cta-box-widget,
    .cta-box {
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 20px 0;
    }
    
    .cta-box-widget:hover,
    .cta-box:hover {
        box-shadow: none;
        transform: none;
    }
}

/* Page-specific CTA styling */
.page-specific-cta {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.page-specific-cta:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px) !important;
}

.cta-box-widget .cta-logo,
.cta-logo {
    margin-bottom: 16px;
}

.cta-box-widget .cta-logo img,
.cta-logo img {
    max-width: 120px;
    height: auto;
}

.cta-box-widget h3,
.cta-title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
    line-height: 1.4;
}

.cta-box-widget p,
.cta-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cta-box-widget p:last-of-type,
.cta-description p {
    margin: 0;
}

.cta-box-widget .cta-button,
.cta-button {
    display: inline-block;
    padding: 12px 28px;
    margin-top: 15px;
    background-color: #000000;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.cta-box-widget .cta-button:hover,
.cta-button:hover {
    background-color: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #ffffff !important;
    margin-top: 15px;
}

/* Inline CTA (in content) */
.inline-cta {
    margin: 30px 0;
}

/* Social Share Buttons */
.social-share-widget {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.social-share-widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #212529;
}

.social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: scale(1.1);
}

.social-btn.twitter {
    background-color: #1da1f2;
}

.social-btn.facebook {
    background-color: #1877f2;
}

.social-btn.linkedin {
    background-color: #0077b5;
}

.social-btn.email {
    background-color: #ea4335;
}

/* Table of Contents Widget */
.toc-widget {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.toc-widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #212529;
}

.toc-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-widget li {
    margin-bottom: 8px;
}

.toc-widget a {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 4px 0;
    transition: color 0.2s;
}

.toc-widget a:hover {
    color: #0066cc;
}

/* ============================================
   SIDEBAR SOCIAL WIDGET (zoals Zilliz box)
   ============================================ */

.sidebar-social-widget {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.sidebar-social-widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #212529;
}

.sidebar-social-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.sidebar-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.sidebar-social-btn.linkedin:hover {
    background-color: #0077b5;
    border-color: #0077b5;
    color: white;
}

.sidebar-social-btn.twitter:hover {
    background-color: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.sidebar-social-btn.facebook:hover {
    background-color: #1877f2;
    border-color: #1877f2;
    color: white;
}

.sidebar-social-btn.reddit:hover {
    background-color: #ff4500;
    border-color: #ff4500;
    color: white;
}

.sidebar-social-btn.youtube:hover {
    background-color: #ff0000;
    border-color: #ff0000;
    color: white;
}

/* ============================================
   SIDEBAR RESOURCES WIDGET
   ============================================ */

.sidebar-resources-widget {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.sidebar-resources-widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #212529;
}

.resources-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}

.resource-link::before {
    content: "→";
    margin-right: 8px;
    color: #0066cc;
    font-weight: bold;
}

.resource-link:hover {
    background-color: #e9ecef;
    color: #0066cc;
    transform: translateX(4px);
}

/* ============================================
   RESPONSIVE AANPASSINGEN
   ============================================ */

@media (max-width: 991px) {
    .tutorial-container {
        padding: 0px;
    }
    
    .tutorial-title {
        font-size: 28px;
    }
    
    .tutorial-content h2 {
        font-size: 24px;
    }
    
    .tutorial-content {
        font-size: 15px;
    }
}

/* Print Styling */
@media print {
    .tutorial-sidebar,
    .tutorial-navigation,
    .copy-page-section,
    .tutorial-breadcrumb {
        display: none;
    }
    
    .tutorial-layout {
        grid-template-columns: 1fr;
    }
}
.tutorial-author-box{
    display:flex;
    gap:16px;
    align-items:flex-start;
    padding:16px;
    margin:24px 0;
    border:1px solid rgba(0,0,0,0.08);
    border-radius:12px;
}

.tutorial-author-avatar img{
    border-radius:999px;
    object-fit:cover;
    display:block;
}

.tutorial-author-name{
    font-weight:600;
    margin-bottom:6px;
}

.tutorial-author-name span{
    font-weight:400;
    opacity:0.7;
    margin-right:6px;
}

.tutorial-author-bio{
    margin:0 0 10px 0;
    opacity:0.9;
    line-height:1.5;
}

.tutorial-author-link{
    text-decoration:none;
    font-weight:600;
}

/* =========================
   Tutorial page - mobile fixes
   ========================= */

@media (max-width: 980px) {
  /* 1) Layout: van 2 kolommen naar 1 kolom */
  .tutorial-layout {
    display: block !important;
  }

  .tutorial-main-content,
  .tutorial-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 2) Container padding iets ruimer op mobiel */
  .tutorial-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* 3) Voorkom horizontale scroll door te brede elementen */
  .tutorial-page-wrapper,
  .tutorial-container,
  .tutorial-article,
  .tutorial-content {
    overflow-x: hidden;
  }

  /* 4) Social buttons: laten wrappen */
  .social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .social-buttons .social-btn {
    flex: 0 0 auto;
  }

  /* 5) Author box: stapelen ipv naast elkaar */
  .tutorial-author-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .tutorial-author-avatar img {
    width: 72px;
    height: 72px;
  }

  /* 6) Navigation knoppen onder elkaar */
  .tutorial-navigation {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tutorial-navigation .nav-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* 7) Keep Reading cards: 1 kolom */
  .related-articles-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

.tutorial-author-bio {
  text-align: justify;
  color: #212529;
}