/* --- Specifieke Documentatie Layout --- */
.documentation-container {
    max-width: 1824px;
    margin: 0 auto;
    margin-bottom: 120px;
}

.documentation-layout {
    display: grid;
    grid-template-columns: 240px 1fr 240px; /* Sidebar | Main | TOC */
    gap: 48px;
    padding-top: 120px; /* Ruimte voor fixed header */
    align-items: start;
}

.contact-link {
    color: #007aff;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.category-grid {
    display: grid;
    /* Maakt 1 kolom op mobiel en tot 3 op desktop */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-card {
    min-height: 200px;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #1a1a1a;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    background-color: #f8fafd;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    border-color: #007aff;
}

.category-card .card-content {
    position: relative;
    z-index: 2;
}

.category-card h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card p {
    color: #555;
    line-height: 1.5;
}

/* --- Linker Sidebar --- */
.sidebar {
    position: sticky; top: 100px; height: calc(100vh - 120px);
    overflow-y: auto; font-size: 15px;
}
.sidebar ul { list-style: none; }
.sidebar .category { margin-bottom: 16px; }
.sidebar .dropdown-toggle {
    background: none; border: none; font-size: 14px; font-weight: 600; color: #1a1a1a;
    cursor: pointer; width: 100%; text-align: left; padding: 8px 0;
    display: flex; justify-content: space-between; align-items: center; font-family: inherit;
}
.sidebar .dropdown-toggle::after {
    content: '›'; font-size: 1.5em; transition: transform 0.2s ease; transform: rotate(90deg); margin: 0 15px;
}
.sidebar .dropdown-toggle.collapsed::after { transform: rotate(0deg); }
.sidebar .dropdown-menu {
    list-style: none; padding-left: 0px; margin-top: 8px;
    max-height: 400px; overflow: hidden; transition: max-height 0.5s ease-in-out;
}
.sidebar .dropdown-menu.collapsed { max-height: 0; }
.sidebar .dropdown-menu li a {
    display: block; color: #555; padding: 6px 12px;
    margin-bottom: 4px; border-left: 2px solid transparent;
}
.sidebar .dropdown-menu li a:hover { background-color: #f8fafd; color: #1a1a1a; }
.sidebar .dropdown-menu li a.active-doc {
    color: #007aff; font-weight: 500; border-left-color: #007aff;
}

/* --- Hoofdinhoud --- */
.main-content { min-width: 0; }
#documentation-content .intro { font-size: 1.2em; color: #555; margin-bottom: 2rem; }
#documentation-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
#documentation-content h1, h2 {
    border-bottom: 1px solid #f0f0f0; padding-bottom: 0.5rem;
    margin-bottom: 1rem; margin-top: 5rem; scroll-margin-top: 100px;
}
#documentation-content h1 { font-size: 2.8em; margin-top: 0; font-weight: 600; }
#documentation-content h2 { font-size: 1.8em; font-weight: 600; }
#documentation-content p, #documentation-content ul {
    font-size: 16px; line-height: 1.7; margin-bottom: 1.25rem; color:#333;
}
#documentation-content ul { padding-left: 20px; }
#documentation-content pre[class*="language-"] {
    position: relative;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow-x: auto;
    border: none; /* Verwijder de oude border */
}

/* Zorg ervoor dat de code de juiste font en grootte heeft */
#documentation-content code[class*="language-"] {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* Maak de kopieerknop geschikt voor een donkere achtergrond */
.copy-code-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: #43444a; /* Donkergrijs, passend bij het thema */
    color: #f0f0f0;
    border: 1px solid #5c5e65;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 16px; /* Maakt het icoon iets duidelijker */
}

#documentation-content pre:hover .copy-code-button {
    opacity: 1;
}

.copy-code-button:hover {
    background-color: #5c5e65;
}

/* --- Rechter "On This Page" Sidebar --- */
.on-this-page { position: sticky; top: 100px; }
.on-this-page h4 { font-weight: 600; font-size: 14px; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.5px; color: #555; }
#toc-list { list-style: none; padding-left: 0; border-left: 1px solid #e5e7eb; }
#toc-list li a {
    display: block; padding: 6px 16px; text-decoration: none;
    color: #555; font-size: 14px; transition: all 0.2s ease;
    border-left: 2px solid transparent; margin-left: -1px;
}
#toc-list li a:hover { color: #1a1a1a; }
#toc-list li a.toc-active {
    color: #007aff; font-weight: 600; border-left-color: #007aff;
}

/* --- Documentatie Link Card --- */
#documentation-content .doc-link-card {
    display: block; /* Maakt van de <a> een blok-element */
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 2rem 0;
    text-decoration: none;
    color: #1a1a1a;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
    background-color: #f8fafd;
}

#documentation-content .doc-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    border-color: #007aff;
}

#documentation-content .doc-link-card .link-card-title {
    font-weight: 600;
    font-size: 1.1em;
}

#documentation-content .doc-link-card .link-card-text {
    color: #555;
    font-size: 1em;
    line-height: 1.5;
}

#documentation-content .doc-link-card::after {
    content: ''; /* Leegmaken, we gebruiken een achtergrond-icoon */
    position: absolute;
    top: 50%; /* Verticaal centreren */
    right: 24px;
    transform: translateY(-50%) rotate(-45deg); /* Fijn-afstelling voor perfecte verticale centrering */
    width: 20px;
    height: 20px;
    
    /* Het SVG-icoon als een 'mask' voor makkelijke kleurverandering */
    background-color: #9ca3af; /* Initiele kleur van het icoon */
    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='5' y1='12' x2='19' y2='12'/%3e%3cpolyline points='12 5 19 12 12 19'/%3e%3c/svg%3e");
    mask-size: contain;
    mask-repeat: no-repeat;
    
    /* Vloeiende transities voor de animatie */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}

/* De animatie bij hover */
#documentation-content .doc-link-card:hover::after {
    transform: translateY(-50%) rotate(0deg); /* Draai de pijl vanuit zijn nieuwe gecentreerde positie */
    background-color: #007aff; /* Maak de pijl blauw bij hover */
}

/* --- Responsive Design voor Documentatie --- */
@media (max-width: 1024px) {
    .documentation-layout { grid-template-columns: 220px 1fr; }
    .on-this-page { display: none; }
}
@media (max-width: 768px) {
    .documentation-layout { grid-template-columns: 1fr; padding-top: 100px; }
    .sidebar { position: static; height: auto; overflow-y: visible; margin-bottom: 2rem; }
}