@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Gentium+Book+Basic:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=STIX+Two+Text:ital,wght@0,400;0,500;1,400;1,500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* Navigation buttons - fixed at bottom */
.nav-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 0;
    padding: 8px 16px;
    z-index: 9999;
    line-height: 1;
    margin: 0;
    width: 72vw;
    left: calc(18vw + 10px);
    background: transparent;
    pointer-events: none;
}

.nav-buttons button {
    pointer-events: auto;
    background: white;
    border: none;
    padding: 6px 16px;
    margin: 0 4px;
    font-size: 20px !important;
    font-family: 'MedievalSharp', sans-serif !important;
    color: #222222;
    -webkit-text-stroke: 2px #222222;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* Colophon modal */
.colophon-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.colophon-overlay.active {
    opacity: 1;
    visibility: visible;
}







/* Navigation buttons - default single row */
.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: left;
    gap: 2px 6px;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    position: fixed;
    bottom: 12px;
     margin: 0;
    width: 72vw;
    left: calc(18vw + 10px);
    z-index: 9999;
    max-width: 95vw;
}

.nav-buttons button {
    pointer-events: auto;
    background: white;
    border: none;
    padding: 6px 16px;
    margin: 0 4px;
    font-size: 20px !important;
    font-family: 'MedievalSharp', sans-serif !important;
    color: #222222;
    -webkit-text-stroke: 2px #222222;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-buttons button:hover {
    text-decoration: underline;
}

.nav-buttons .separator {
    color: #999;
    user-select: none;
}

/* Dark mode support */
.nav-dark-mode .nav-buttons {
}

.nav-dark-mode .nav-buttons button {
    color: #eee;
}

.nav-dark-mode .nav-buttons .separator {
    color: #666;
}

/* Responsive: two rows on smaller screens */
@media (max-width: 700px) {
    .nav-buttons {
        display: none;
        grid-template-columns: auto auto auto;
        gap: 2px 8px;
        justify-content: center;
        align-items: center;
        padding: 4px 10px;
        font-size: 11px;
        bottom: 5px;
        max-width: 98vw;
    }
    
    .nav-buttons .separator {
        display: none;
    }
}




















.colophon-modal {
    background: #fff;
    padding: 40px 50px;
    max-width: 85vw;
    max-height: 75vh;
    overflow-y: auto;
    position: relative;
font-family: 'alda', serif; font-size: 25px; font-weight: 400;  overflow-x: hidden;
    line-height: 1.6;
}

body.nav-dark-mode .colophon-modal {
        background: black;
}

.colophon-modal h2 {
    margin-top: 0;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.colophon-modal .close-colophon {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #000;
}
.colophon-modal .close-colophon:hover {
    opacity: 0.6;
}

.nav-buttons button:hover {
    transform: scale(1.1);
    background: #ff0000;
    color: white;
    -webkit-text-stroke: 2px white;
    box-shadow: 0 4px 16px rgba(255,0,0,0.3);
}

.nav-buttons button:active {
    transform: scale(0.95);
}

.nav-buttons .separator {
    color: rgba(255,255,255,0.3);
    font-size: 18px;
    user-select: none;
    padding: 0 2px;
    pointer-events: none;
    font-family: 'MedievalSharp', sans-serif !important;
}

/* Dark mode - Navigation buttons */
body.nav-dark-mode .nav-buttons button {
    background: #222;
    color: #eee;
    -webkit-text-stroke: 2px #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body.nav-dark-mode .nav-buttons button:hover {
    background: #ff0000;
    color: white;
    -webkit-text-stroke: 2px white;
}

body.nav-dark-mode .nav-buttons .separator {
    color: rgba(255,255,255,0.2);
}

/* Small screens */
@media (max-width: 900px) {
    .nav-buttons {
        width: 90vw;
        left: 5vw;
        padding: 6px 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-buttons button {
        padding: 4px 12px;
        font-size: 14px !important;
        -webkit-text-stroke: 1px #222222;
        margin: 2px 3px;
    }
    .nav-buttons .separator {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .nav-buttons {
        width: 96vw;
        left: 2vw;
        padding: 4px 4px;
    }
    .nav-buttons button {
        padding: 3px 8px;
        font-size: 11px !important;
        -webkit-text-stroke: 1px #222222;
        margin: 2px 2px;
        border-radius: 30px;
    }
    .nav-buttons .separator {
        font-size: 10px;
        padding: 0 1px;
    }
}


@media (max-width: 900px) {
    body.has-nav-buttons .column.texter {
        padding-bottom: 90px;
    }
}

@media (max-width: 600px) {
    body.has-nav-buttons .column.texter {
        padding-bottom: 80px;
    }
}

/* ============================================================ */
/* DARK MODE - Full page styling */
/* ============================================================ */

body.nav-dark-mode {
    background: #111 !important;
    color: #eee !important;
}

/* Main columns */
body.nav-dark-mode .column,
body.nav-dark-mode .column.texter,
body.nav-dark-mode #texting,
body.nav-dark-mode .column.left {
    background: #111 !important;
    color: #eee !important;
}

body.nav-dark-mode .column.left #zandbank a,
body.nav-dark-mode .column.left #about a {
    color: #eee !important;
}

body.nav-dark-mode .column.left #about {
    color: #ccc !important;
}

/* Borders */
body.nav-dark-mode .column,
body.nav-dark-mode .middle,
body.nav-dark-mode .middle-l,
body.nav-dark-mode .middle-r,
body.nav-dark-mode .left,
body.nav-dark-mode .right,
body.nav-dark-mode .texter {
    border-color: #333 !important;
}

/* Headings - preserve MedievalSharp styling but invert colors */
body.nav-dark-mode H1,
body.nav-dark-mode H2,
body.nav-dark-mode H3,
body.nav-dark-mode H4,
body.nav-dark-mode H5,
body.nav-dark-mode #enhalt,
body.nav-dark-mode #publishes,
body.nav-dark-mode #archives {
    color: #eee !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
}

body.nav-dark-mode #enhalt {
    color: #eee !important;
    text-shadow: none !important;
}

/* Links */
body.nav-dark-mode a {
    color: #99ccff !important;
}

body.nav-dark-mode a:hover {
    color: #ff6666 !important;
}

body.nav-dark-mode a:visited {
    color: #aa88cc !important;
}

/* Block links (index page) */
body.nav-dark-mode #block>a>h4 {
    color: #eee !important;
    -webkit-text-stroke: 0 !important;
    background-color: #222 !important;
}

body.nav-dark-mode #block>a:visited>h4 {
    color: #888 !important;
    background-color: #222 !important;
}

body.nav-dark-mode #block>a>h4:hover,
body.nav-dark-mode #block:hover>a>h4 {
    color: #222 !important;
    -webkit-text-stroke: 0 !important;
    background-color: #eee !important;
}

/* Language buttons */
body.nav-dark-mode .langbut {
    background-color: #222 !important;
    border: 1px solid #444;
}

body.nav-dark-mode .dutchlang {
    background-color: #1a1a0a !important;
}

body.nav-dark-mode .englishlang {
    background-color: #0a1a1a !important;
}

body.nav-dark-mode .langbut h1 {
    color: #eee !important;
    -webkit-text-stroke: 0 !important;
}

/* Tables */
body.nav-dark-mode #contentssign td,
body.nav-dark-mode #contentssign th {
    color: #eee !important;
}

/* Images - subtle dark mode adjustment */
body.nav-dark-mode img {
    filter: brightness(0.85) contrast(1.05);
}

/* Book preview elements */
body.nav-dark-mode .book-type {
    color: #aaa !important;
}

body.nav-dark-mode .book-title {
    color: #eee !important;
}

body.nav-dark-mode .tag {
    border-color: #666 !important;
    color: #ccc !important;
}

body.nav-dark-mode .book-image {
    filter: brightness(0.85) contrast(1.05);
}

/* About section */
body.nav-dark-mode #about {
    color: #ccc !important;
}

/* Sandbank fixed position */
body.nav-dark-mode #sandbank2,
body.nav-dark-mode #sandbank {
    color: #eee !important;
}

/* Part of - rotated text */
body.nav-dark-mode #partof {
    color: #888 !important;
}

body.nav-dark-mode #partof a {
    color: #888 !important;
}

body.nav-dark-mode #partof a:hover {
    color: #ff6666 !important;
}

/* Tables - maintain readability */
body.nav-dark-mode table {
    color: #eee !important;
}

body.nav-dark-mode table a {
    color: #99ccff !important;
}

body.nav-dark-mode table a:hover {
    color: #ff6666 !important;
}

body.nav-dark-mode table a:visited {
    color: #aa88cc !important;
}

/* ============================================================ */
/* LIGHT MODE - Preserve original styling */
/* ============================================================ */

body:not(.nav-dark-mode) H1,
body:not(.nav-dark-mode) H2,
body:not(.nav-dark-mode) H3,
body:not(.nav-dark-mode) H4,
body:not(.nav-dark-mode) H5,
body:not(.nav-dark-mode) #enhalt,
body:not(.nav-dark-mode) #publishes,
body:not(.nav-dark-mode) #archives {
    color: #222222;
    -webkit-text-stroke: 2.5px #222222;
}

body:not(.nav-dark-mode) H2 {
    -webkit-text-stroke: 10px #222222;
}

body:not(.nav-dark-mode) H3 {
    -webkit-text-stroke: 8px #222222;
}

body:not(.nav-dark-mode) H4 {
    -webkit-text-stroke: 4px #222222;
}

body:not(.nav-dark-mode) H5 {
    -webkit-text-stroke: 2px #222222;
}

body:not(.nav-dark-mode) #enhalt,
body:not(.nav-dark-mode) #publishes,
body:not(.nav-dark-mode) #archives {
    text-shadow:
        -0.25px -0.25px 0 #222222,
        0.25px -0.25px 0 #222222,
        -0.25px 0.25px 0 #222222,
        0.25px 0.25px 0 #222222,
        -0.5px 0 0 #222222,
        0.5px 0 0 #222222,
        0 0.5px 0 #222222,
        0 -0.5px 0 #222222;
}

@media (max-width: 800px) {
    body:not(.nav-dark-mode) H1 {
        -webkit-text-stroke: 3px #222222;
    }
    body:not(.nav-dark-mode) H2 {
        -webkit-text-stroke: 5px #222222;
    }
    body:not(.nav-dark-mode) H3 {
        -webkit-text-stroke: 5px #222222;
    }
    body:not(.nav-dark-mode) H4 {
        -webkit-text-stroke: 3px #222222;
    }
    body:not(.nav-dark-mode) #enhalt,
    body:not(.nav-dark-mode) #publishes,
    body:not(.nav-dark-mode) #archives {
        text-shadow:
            -0.15px -0.15px 0 #222222,
            0.15px -0.15px 0 #222222,
            -0.15px 0.15px 0 #222222,
            0.15px 0.15px 0 #222222,
            -0.25px 0 0 #222222,
            0.25px 0 0 #222222,
            0 0.25px 0 #222222,
            0 -0.25px 0 #222222;
    }
}

/* Special: Mobile dark mode heading adjustments */
@media (max-width: 800px) {
    body.nav-dark-mode H1,
    body.nav-dark-mode H2,
    body.nav-dark-mode H3,
    body.nav-dark-mode H4,
    body.nav-dark-mode H5,
    body.nav-dark-mode #enhalt,
    body.nav-dark-mode #publishes,
    body.nav-dark-mode #archives {
        -webkit-text-stroke: 0 !important;
    }
}   