:root {
    --paper-color: #F5E6D3;
    --text-color: #2C1810;
    --font-size-base: 19px;
    --line-height: 1.8;
    --column-width: 35em;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--paper-color);
    color: var(--text-color);
    min-height: 100vh;
    opacity: 1;
    animation: none;
}

.article-content {
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    background-color: transparent;
    box-shadow: none;
}

#articleBody {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: var(--font-size-base);
    font-family: 'Lora', serif;
    padding: 0 2rem;
}

header {
    background-color: transparent;
    color: var(--text-color);
    border-bottom: 2px solid var(--text-color);
    margin-bottom: 2rem;
}

.home-link {
    color: var(--text-color);
    transition: opacity 0.2s ease;
}

/* Text Size Controls */
.text-controls {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--paper-color);
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.text-control-btn {
    background: var(--text-color);
    color: var(--paper-color);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}

.text-control-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.text-control-btn:active {
    transform: scale(0.95);
}

.text-control-btn:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}

.text-control-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Column Layout */
#articleBody {
    column-width: 400px;
    column-gap: 3rem;
    column-rule: 1px solid var(--gray);
}

@media (max-width: 768px) {
    .text-controls {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        top: auto;
        transform: none;
        flex-direction: row;
    }

    #articleBody {
        padding: 0 1rem;
    }
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.error-message h2 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.error-message .nav-button {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
} 

.newspaper-header {
    background-color: transparent;
    color: var(--text-color);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.header-top {
    padding: 1rem 0;
}

.home-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.home-link:hover {
    text-decoration: underline;
    transform: translateX(-5px);
    opacity: 0.7;
}

.masthead {
    text-align: center;
    padding: 2rem 0;
}

.masthead h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 4.5rem;
    margin: 0;
    letter-spacing: -1px;
    color: var(--text-color);
}

.article-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.article-meta {
    text-align: center;
    font-style: italic;
    color: var(--gray);
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .masthead h1 {
        font-size: 3rem;
    }

    .header-top {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

#articleBody p {
    margin-bottom: 1.5em;
}

#articleBody h2, #articleBody h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    break-after: avoid;
    color: var(--text-color);
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    padding: 0 2rem;
}

.article-navigation.bottom-nav {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(44, 24, 16, 0.1);
}

.nav-button {
    background: var(--text-color);
    color: var(--paper-color);
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    min-width: 150px;
}

.nav-button:hover:not(:disabled) {
    opacity: 0.8;
    transform: translateY(-1px);
}

.nav-button:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-button:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.nav-button:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}

.nav-button:focus:not(:focus-visible) {
    outline: none;
}

@media (max-width: 768px) {
    .article-navigation {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-button {
        width: 100%;
        min-width: unset;
    }

    .text-controls {
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        top: auto;
        transform: none;
        flex-direction: row;
        z-index: 100;
    }
    
    #articleContainer {
        padding: 0 1rem;
    }
}

/* Keyframe definities */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Smooth scrolling voor de hele pagina */
html {
    scroll-behavior: smooth;
}

/* Prefers-reduced-motion media query voor toegankelijkheid */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Simpele fade-in keyframe */
@keyframes simpleFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Headers */
#articleBody h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-color);
}

#articleBody h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: var(--dark-blue);
}

#articleBody h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
}

/* Afbeeldingen */
#articleBody img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Lijsten */
#articleBody ul, 
#articleBody ol {
    margin: 1.5rem 0;
    padding-left: 1.2rem;
}

#articleBody li {
    margin: 0.8rem 0;
    padding-left: 0.5rem;
}

/* Geneste lijsten */
#articleBody ul ul,
#articleBody ol ol,
#articleBody ul ol,
#articleBody ol ul {
    margin: 0.8rem 0 0.8rem 1rem;
}

#articleBody li > ul,
#articleBody li > ol {
    margin-top: 0.5rem;
}

/* Specifieke lijst markers */
#articleBody ul li {
    list-style-type: none;
    position: relative;
}

#articleBody ul li::before {
    content: "•";
    color: var(--dark-blue);
    position: absolute;
    left: -1.2rem;
    font-weight: bold;
}

#articleBody ol {
    counter-reset: item;
    list-style-type: none;
}

#articleBody ol li {
    counter-increment: item;
    position: relative;
}

#articleBody ol li::before {
    content: counter(item) ".";
    color: var(--dark-blue);
    position: absolute;
    left: -1.5rem;
    font-weight: 500;
}

/* Blockquotes */
#articleBody blockquote {
    margin: 2rem 0;
    padding: 1rem 2rem;
    border-left: 4px solid var(--dark-blue);
    background-color: rgba(26, 38, 57, 0.05);
    font-style: italic;
}

#articleBody blockquote p {
    margin: 0;
}

/* Code blocks */
#articleBody pre {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 1.2rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Inline code */
#articleBody code {
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Tabellen */
#articleBody table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

#articleBody th,
#articleBody td {
    padding: 1rem;
    border: 2px solid var(--dark-blue);
    text-align: left;
}

#articleBody th {
    background-color: var(--dark-blue);
    color: var(--paper-color);
    border-bottom: 2px solid var(--dark-blue);
    font-weight: 600;
}

#articleBody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.02);
}

/* Links */
#articleBody a {
    color: var(--dark-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--dark-blue);
    transition: opacity 0.2s ease;
}

#articleBody a:hover {
    opacity: 0.7;
}

/* Horizontale lijn */
#articleBody hr {
    margin: 3rem 0;
    border: none;
    border-top: 2px solid rgba(26, 38, 57, 0.1);
}

/* Tekst styling */
#articleBody strong {
    color: var(--dark-blue);
    font-weight: 700;
}

#articleBody em {
    font-style: italic;
}

/* Responsive aanpassingen */
@media (max-width: 768px) {
    #articleBody {
        padding: 0 1rem;
    }

    #articleBody h1 {
        font-size: 2rem;
    }

    #articleBody h2 {
        font-size: 1.75rem;
    }

    #articleBody h3 {
        font-size: 1.5rem;
    }

    #articleBody table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #articleBody th,
    #articleBody td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Loading animatie */
@keyframes articleLoad {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        rgba(44, 24, 16, 0.03) 25%,
        rgba(44, 24, 16, 0.08) 37%,
        rgba(44, 24, 16, 0.03) 63%
    );
    background-size: 400% 100%;
    animation: articleLoad 1.5s ease infinite;
}

/* Loading states */
.article-title.loading {
    height: 3rem;
    width: 70%;
    margin: 2rem auto;
}

.article-body-loading {
    margin: 2rem auto;
    max-width: 800px;
    padding: 0 2rem;
}

.loading-paragraph {
    height: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.loading-paragraph:nth-child(even) {
    width: 92%;
}

.loading-paragraph:nth-child(3n) {
    width: 96%;
}

@media (prefers-reduced-motion: reduce) {
    .loading-shimmer {
        animation: none;
        background: rgba(44, 24, 16, 0.03);
    }
}

/* Loading states voor datum */
.article-meta.loading {
    margin: 1rem auto;
    height: 1.2rem;
    width: 200px;
    text-align: center;
}

/* Tablet styling (iPad) */
@media (max-width: 1024px) {
    .article-content {
        padding: 1.5rem;
    }

    #articleBody {
        font-size: 18px;
        line-height: 1.7;
        padding: 0 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }
}

/* Mobile styling */
@media (max-width: 768px) {
    .article-content {
        padding: 1rem;
    }

    #articleBody {
        font-size: 16px;
        line-height: 1.6;
        padding: 0 1rem;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-button {
        width: 100%;
        padding: 0.8rem;
    }

    .text-controls {
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        background: var(--paper-color);
        padding: 0.5rem;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    #articleBody {
        font-size: 16px;
    }

    .article-title {
        font-size: 1.5rem;
    }
}

/* Verbeterde leesbaarheid */
#articleBody {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

/* Verbeterde tabel weergave op mobile */
#articleBody table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#articleBody img {
    max-width: 100%;
    height: auto;
}

/* Improve article structure */
#articleContainer {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}