
/* MD.css - Styling NUR für die .md Markdown-Klasse */

/* ==========================================================================
   Reset und Basis-Styling
   ========================================================================== */

.md * {
    box-sizing: border-box;
}

/* ==========================================================================
   Typography
   ========================================================================== */



/* ==========================================================================
   Inline-Elemente
   ========================================================================== */

.md strong {
    font-weight: 600;
    color: #1a1a1a;
}

.md em {
    font-style: italic;
    color: #555;
}

.md code {
    font-family: 'SF Mono', Monaco,  'Roboto Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #f6f8fa;
    color: #d73a49;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    border: 1px solid #e1e5e9;
}

.md a {
    color: var(--color-link);
    transition: color 0.2s ease;
}

.md a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.md a:visited {
    color: var(--color-link-visited);
}

/* ==========================================================================
   Code-Blöcke
   ========================================================================== */

.md pre {
    font-family:  Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.45;
    background-color: var(--color-code-bg);
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    position: relative;
}

.md pre code {
    background: none;
    border: none;
    padding: 0;
    color: #24292e;
    font-size: inherit;
}

/* Syntax Highlighting für verschiedene Sprachen */
.md pre code.language-php::before {
    content: "PHP";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: #6a737d;
    font-weight: 500;
}

.md pre code.language-javascript::before {
    content: "JavaScript";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: #6a737d;
    font-weight: 500;
}

.md pre code.language-css::before {
    content: "CSS";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: #6a737d;
    font-weight: 500;
}

/* ==========================================================================
   Listen
   ========================================================================== */

.md ul, .md ol {
    margin: 0 0 1rem 0;
    padding-left: 2rem;
}

.md ul {
    list-style-type: disc;
}

.md ol {
    list-style-type: decimal;
}

.md li {
    margin: 0.25rem 0;
    line-height: 1.6;
}

.md li > ul,
.md li > ol {
    margin: 0.25rem 0;
}

/* ==========================================================================
   Blockquotes
   ========================================================================== */

.md blockquote {
    margin: 1rem 0;
    padding: 0 1rem;
    border-left: 4px solid #dfe2e5;
    background-color: #f8f9fa;
    color: #6a737d;
    font-style: italic;
}

.md blockquote p {
    margin: 0.5rem 0;
}

/* ==========================================================================
   Horizontale Linien
   ========================================================================== */

.md hr {
    height: 2px;
    background-color: #e1e5e9;
    border: none;
    margin: 2rem 0;
}

/* ==========================================================================
   Tabellen
   ========================================================================== */

.md table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    font-size: 0.9rem;
    overflow: hidden;
}

.md th, .md td {
    text-align: left;
	vertical-align: top;
    border-bottom: 1px solid var(--color-table-line);
}

.md th {
    font-weight: 600;
    color: #24292e;
    border-bottom: 1px solid  var(--color-table-line);
}


/* ==========================================================================
   Bilder und Figure-Elemente
   ========================================================================== */

.md img {
    max-width: 100%;
    height: auto;
}

/* Image Container (Figure) */
.md figure.bild {
    margin: 0.5rem 0;
    overflow: hidden;
    display: inline-block;
    max-width: 100%;
}

.md figure.bild img {
    display: block;
    margin: 0;
}

/* Figcaption mit Caption links und Credit rechts */
.md figure.bild figcaption {
    padding: 0.3rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Caption links */
.md .image-caption {
    color: var(--color-text-figure-caption);
    font-weight: 500;
    flex: 1;
}

/* Credit rechts */
.md .image-credit {
	color: var(--color-text-figure-credit);
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

figure{
    margin: 0;
    padding: 0;
}


figure.g_3 {
    flex: 0 0 calc(33.333% - 10px); /* 3 pro Zeile inkl. Gap */
    margin:0;
    padding:0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-between;
    align-self: flex-end; /* ⬅️ nur dieses Element am unteren Rand ausrichten */
    min-width: 200px;

}

figure.g_3 img {
    max-width: 100%;
    height: auto;
}

figure.g_3 figcaption {
    margin-top: auto; /* schiebt Caption an den unteren Rand */
}


figure.portrait{
    width: 20%;
    min-width: 100px;
    margin-right: auto;
    float: left;
    margin: 1rem;

}


/* Responsive Verhalten für kleine Bildschirme */
@media (max-width: 600px) {
    .md figure.bild figcaption {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .md .image-credit {
        white-space: normal;
    }
}

/* ==========================================================================
   Spezielle Image-Klassen
   ========================================================================== */

/* Responsive Images */
.md .responsive {
    width: 100%;
    height: auto;
}

/* Gallery Images */
.md .gallery-image {
    transition: transform 0.2s ease;
}

.md .gallery-image:hover {
    transform: scale(1.02);
}

/* Bordered Images */
.md .bordered {
    border: 2px solid #e1e5e9;
}

/* City View Example */
.md .city-view {
    filter: contrast(1.1) brightness(1.05);
}

/* Logo Styling */
.md .logo {
    background: #fff;
    padding: 0.5rem;
    border: 1px solid #e1e5e9;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Text Alignment */
.md .text-center {
    text-align: center;
}

.md .text-left {
    text-align: left;
}

.md .text-right {
    text-align: right;
}

/* Spacing */
.md .mb-0 { margin-bottom: 0; }
.md .mb-1 { margin-bottom: 0.5rem; }
.md .mb-2 { margin-bottom: 1rem; }
.md .mb-3 { margin-bottom: 1.5rem; }
.md .mb-4 { margin-bottom: 2rem; }

.md .mt-0 { margin-top: 0; }
.md .mt-1 { margin-top: 0.5rem; }
.md .mt-2 { margin-top: 1rem; }
.md .mt-3 { margin-top: 1.5rem; }
.md .mt-4 { margin-top: 2rem; }

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .md * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .md a, .md a:visited {
        text-decoration: underline;
    }

    .md figure.bild {

    }

    .md pre, .md blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    .md h1, .md h2, .md h3 {
        page-break-after: avoid;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */
/*
@media (prefers-color-scheme: dark) {
    .md h1, .md h2, .md h3, .md h4, .md h5, .md h6 {
        color: #f0f6fc;
    }

    .md h1, .md h2 {
        border-bottom-color: #30363d;
    }

    .md p {
        color: #c9d1d9;
    }

    .md code {
        background-color: #161b22;
        color: #f85149;
        border-color: #30363d;
    }

    .md pre {
        background-color: #0d1117;
        border-color: #30363d;
    }

    .md pre code {
        color: #c9d1d9;
    }

    .md blockquote {
        border-left-color: #30363d;
        background-color: #161b22;
        color: #8b949e;
    }

    .md hr {
        background-color: #30363d;
    }

    .md table th {
        background-color: #161b22;
        color: #f0f6fc;
        border-bottom-color: #30363d;
    }

    .md table td {
        border-bottom-color: #30363d;
    }

    .md table tr:nth-child(even) {
        background-color: #0d1117;
    }

    .md table tr:hover {
        background-color: #161b22;
    }

    .md figure.bild {
        background: #0d1117;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    }

    .md figure.bild figcaption {
        background-color: #161b22;
        border-top-color: #30363d;
    }

    .md .image-caption {
        color: #f0f6fc;
    }

    .md .image-credit {
        color: #8b949e;
    }

    .md .bordered {
        border-color: #30363d;
    }

    .md .logo {
        background: #0d1117;
        border-color: #30363d;
    }
}

 */