/* ==========================================================================
   Font
   ========================================================================== */

@font-face {
    font-family: "Swung Note";
    src: url("../fonts/SwungNote.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    line-height: 1.6;
    color: #15171a;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { text-decoration: none; color: inherit; }

h1, h2, h3, h4 {
    font-family: "Swung Note", Georgia, serif;
    margin: 0;
}

h1 { font-size: 30px; letter-spacing: 3px; }
h2 { font-size: 25px; letter-spacing: 1px; }
h3 { font-size: 25px; letter-spacing: 1px; }
h4 { font-size: 12px; letter-spacing: 1px; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   Header – Desktop
   ========================================================================== */

.site-header {
    background: #fff;
}

.header-logo-row {
    padding: 16px 0 8px;
}

.site-logo {
    width: 500px;
    max-width: 100%;
}

/* Desktop nav row */
.desktop-nav {
    padding: 0;
}

.desktop-nav .container {
    border: 1px solid #e8e8e8;
}

.main-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #000;
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item h2 {
    font-size: 22px;
    color: #000;
    margin: 0;
}

.nav-item:hover {
    background: #f5f5f5;
}

.dropdown-caret {
    font-size: 14px;
    margin-left: 4px;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: none;
    min-width: 200px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.dropdown-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 16px;
    color: #333;
    font-family: "Swung Note", Georgia, serif;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child { border-bottom: none; }

.dropdown-menu a:hover {
    background: #f5f5f5;
    color: #000;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

/* ==========================================================================
   Header – Mobile topnav
   ========================================================================== */

.topnav {
    display: none;
    background-color: #333;
    position: relative;
    overflow: hidden;
}

.topnav-logo {
    display: block;
    padding: 8px 12px;
    background: #fff;
}

.site-logo-mobile {
    max-height: 60px;
    width: auto;
}

#mobile-nav-links {
    display: none;
}

#mobile-nav-links a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0 10px 2px;
}

#mobile-nav-links h2 {
    color: #fff;
    font-family: "Swung Note", Georgia, serif;
    font-size: 22px;
}

#mobile-nav-links a:hover {
    background-color: #ddd;
    color: #000;
}

#mobile-nav-links a:hover h2 {
    color: #000;
}

.hamburger-icon {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    padding: 16px;
    background: #000;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.hamburger-icon:hover {
    background: #444;
}

/* ==========================================================================
   Responsive visibility helpers
   ========================================================================== */

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .topnav { display: block; }
}

@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

/* ==========================================================================
   Homepage post grid
   ========================================================================== */

.post-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 0;
    max-width: 1200px;
    margin: 0 auto;
}

.post-grid-row {
    display: flex;
    align-items: stretch;
    margin: 0 5px 10px 5px;
}

.post-grid-image {
    display: block;
    flex-shrink: 0;
}

.post-grid-image img {
    height: 160px;
    width: auto;
    max-width: 400px;
    object-fit: cover;
    display: block;
}

/* Colored label boxes */
.post-grid-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    min-height: 100px;
    padding: 16px 12px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.post-grid-label a {
    color: #fff;
    text-align: center;
    display: block;
}

.post-grid-label h2 {
    color: #fff;
    font-family: "Swung Note", Georgia, serif;
    font-size: 22px;
    letter-spacing: 1px;
    line-height: 1.3;
}

/* 4-color cycle via nth-child */
.post-grid-row:nth-child(4n+1) .post-grid-label,
.color-0, .color-4, .color-8, .color-12 {
    background-image: linear-gradient(to bottom right, #6ECBEB, #2895ae);
}

.post-grid-row:nth-child(4n+2) .post-grid-label,
.color-1, .color-5, .color-9, .color-13 {
    background-image: linear-gradient(to bottom right, #528B9E, #377c93);
}

.post-grid-row:nth-child(4n+3) .post-grid-label,
.color-2, .color-6, .color-10, .color-14 {
    background-image: linear-gradient(to bottom right, #EB869F, #c84b6a);
}

.post-grid-row:nth-child(4n+4) .post-grid-label,
.color-3, .color-7, .color-11, .color-15 {
    background-image: linear-gradient(to bottom right, #9e2f4a, #901c38);
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .post-grid {
        flex-direction: column;
        padding: 8px;
    }

    .post-grid-row {
        flex-direction: column;
        margin: 0 0 12px;
        width: 100%;
    }

    .post-grid-image img {
        height: auto;
        width: 100%;
        max-width: 100%;
    }

    .post-grid-label {
        width: 100%;
        min-height: 70px;
    }
}

/* ==========================================================================
   Archive header (tag / author)
   ========================================================================== */

.archive-header {
    padding: 32px 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 16px;
}

.archive-header h1 {
    font-family: "Swung Note", Georgia, serif;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================================================
   Post / Page article
   ========================================================================== */

.post-article, .page-article {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 16px;
}

.post-header {
    margin-bottom: 32px;
    text-align: center;
}

.post-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #777;
    margin-bottom: 12px;
}

.post-title {
    font-family: "Swung Note", Georgia, serif;
    font-size: 2rem;
    letter-spacing: 2px;
    line-height: 1.25;
    margin-bottom: 16px;
}

.post-meta {
    font-size: 0.9rem;
    color: #888;
}

.post-meta a { color: #888; }
.post-meta a:hover { color: #333; }

.post-feature-image {
    margin: 0 0 40px;
}

.post-feature-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    font-family: "Swung Note", Georgia, serif;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.post-content p { margin-bottom: 1.4em; }

.post-content img {
    max-width: 100%;
    margin: 1.5em auto;
}

.post-content a {
    color: #2895ae;
    text-decoration: underline;
}

/* Image-left + text-right layout for book/product entries */
.book-entry {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 48px;
}

.book-entry img {
    width: 320px;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
    margin: 0;
}

.book-entry-text {
    flex: 1;
}

.book-entry-text h2 {
    font-family: "Swung Note", Georgia, serif;
    margin-top: 0;
    margin-bottom: 0.4em;
}

@media (max-width: 600px) {
    .book-entry {
        flex-direction: column;
    }
    .book-entry img {
        width: 100%;
        max-width: 220px;
    }
}

.post-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.tag-pill:hover {
    background: #f5f5f5;
    color: #333;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 16px;
    font-size: 0.9rem;
}

.pagination .older-posts,
.pagination .newer-posts {
    padding: 8px 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Swung Note", Georgia, serif;
    letter-spacing: 0.5px;
}

.pagination .older-posts:hover,
.pagination .newer-posts:hover {
    background: #f5f5f5;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: #222;
    margin-top: 30px;
    padding: 30px 16px;
    text-align: center;
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-social img {
    height: 45px;
    width: auto;
    display: inline-block;
}

.footer-link {
    color: #fff;
    text-decoration: none;
}

.footer-impressum {
    font-family: "Swung Note", Georgia, serif;
    font-size: 22px;
    letter-spacing: 1px;
    color: #fff;
}

.footer-impressum:hover { opacity: 0.8; }

/* ==========================================================================
   Error page
   ========================================================================== */

.error-page {
    text-align: center;
    padding: 80px 16px;
}

.error-page h1 {
    font-size: 5rem;
    font-family: "Swung Note", Georgia, serif;
    margin-bottom: 16px;
}

.error-page a {
    color: #2895ae;
    text-decoration: underline;
}

/* ==========================================================================
   Site main padding
   ========================================================================== */

.site-main {
    flex: 1;
}

/***
Inga.css
**/

.redbox1 {
    color: white;
    background-image: linear-gradient(to bottom right, #9e2f4a, #901c38);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.3);
    box-sizing: unset;
    margin: 10px 5px 0px 0px;
    padding-left: 16px;
}

.redbox2 {
    background-color: #EB869F;
    background-image: linear-gradient(to bottom right, #EB869F, #c84b6a);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.3);
    box-sizing: unset;
    color: white;
    margin: 10px 5px 0px 0px;
    padding-left: 16px;
}

/* ==========================================================================
   Koenig editor card styles
   ========================================================================== */

/* ── Width breakout ── */
.kg-width-wide,
.kg-width-full {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.kg-width-wide  { width: 85vw; }
.kg-width-full  { width: 100vw; }

/* ── Images ── */
.kg-image-card {
    margin: 1.5em 0;
}

.kg-image-card img,
.kg-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.kg-image-card figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    margin-top: 8px;
}

/* ── Gallery ── */
.kg-gallery-card {
    margin: 1.5em 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.kg-gallery-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.kg-gallery-image {
    flex: 1;
    overflow: hidden;
}

.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

/* ── Bookmark ── */
.kg-bookmark-card {
    margin: 1.5em 0;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    min-height: 100px;
}

.kg-bookmark-container:hover {
    border-color: #bbb;
}

.kg-bookmark-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.kg-bookmark-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #15171a;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kg-bookmark-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: #999;
}

.kg-bookmark-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.kg-bookmark-author::after {
    content: '·';
    margin-left: 8px;
}

.kg-bookmark-thumbnail {
    flex-shrink: 0;
    width: 160px;
}

.kg-bookmark-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

@media (max-width: 480px) {
    .kg-bookmark-thumbnail { display: none; }
}

/* ── Embed ── */
.kg-embed-card {
    margin: 1.5em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kg-embed-card iframe,
.kg-embed-card video,
.kg-embed-card audio {
    max-width: 100%;
}

/* ── Video ── */
.kg-video-card {
    margin: 1.5em 0;
    position: relative;
    background: #000;
}

.kg-video-card video {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Audio ── */
.kg-audio-card {
    margin: 1.5em 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
}

/* ── HR / Divider ── */
.kg-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2em 0;
}

/* ── Code ── */
.kg-code-card {
    margin: 1.5em 0;
}

.kg-code-card pre {
    background: #f4f4f4;
    border-radius: 4px;
    padding: 20px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Toggle ── */
.kg-toggle-card {
    margin: 1.5em 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px 20px;
}

.kg-toggle-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.kg-toggle-content {
    margin-top: 12px;
    font-size: 0.95rem;
    color: #444;
}

/* ── Callout ── */
.kg-callout-card {
    margin: 1.5em 0;
    display: flex;
    gap: 12px;
    border-radius: 4px;
    padding: 16px 20px;
    background: #f5f5f5;
}

.kg-callout-emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Button ── */
.kg-button-card {
    margin: 1.5em 0;
    text-align: center;
}

.kg-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    background: #15171a;
    color: #fff;
}

.kg-btn:hover {
    opacity: 0.85;
}

/* ==========================================================================
   Language toggle — driven by data-lang on <html>
   ========================================================================== */

html:not([data-lang="en"]) .lang-en { display: none; }
html[data-lang="en"] .lang-de { display: none; }

/* Desktop lang switch — sits at the right end of the nav bar */
.lang-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
}

.lang-switch-sep {
    color: #bbb;
    font-size: 13px;
}

.lang-switch-btn {
    font-size: 13px;
    letter-spacing: 1px;
    color: #aaa;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: normal;
}

.lang-switch-btn:hover { color: #000; }

html[data-lang="de"] .lang-switch-de,
html[data-lang="en"] .lang-switch-en {
    color: #000;
    font-weight: bold;
    cursor: default;
}

/* Mobile lang switch — inside the dropdown menu */
.lang-switch-mobile {
    padding: 10px 10px 6px;
    color: #ccc;
    font-size: 14px;
    letter-spacing: 1px;
}

.lang-switch-mobile .lang-switch-btn {
    color: #ccc;
}

.lang-switch-mobile .lang-switch-btn:hover { color: #fff; }

html[data-lang="de"] .lang-switch-mobile .lang-switch-de,
html[data-lang="en"] .lang-switch-mobile .lang-switch-en {
    color: #fff;
    font-weight: bold;
    cursor: default;
}