/* ============================================================
   SMRA.CSS  —  Gedeelde basisstijlen
   Schaak maar raak Academy
   Gebruikt door: index.html, boeken.html, en alle subpagina's
   Uitzondering: blog.html / schaakpraat gebruikt eigen CSS
   ============================================================ */


/* ============================================================
   1. CSS-VARIABELEN
   ============================================================ */
:root {
    /* Papier & inkt */
    --ink:           #1a1209;
    --ink-soft:      #3d2f1a;
    --ink-muted:     #7a6a55;
    --paper:         #f5eedf;
    --paper-dark:    #ede4cf;
    --paper-mid:     #e4d8bf;
    --paper-shadow:  #d6c9aa;

    /* Lijnen */
    --rule:          #c8b89a;
    --rule-heavy:    #8c7355;

    /* Accenten */
    --gold:          #b8892a;
    --gold-light:    #d4af37;
    --title-color:   #6b1414;
    --red-accent:    #6b1414;

    /* Footer */
    --footer-bg:     #1e1208;
    --footer-mid:    #2d1e0f;
    --footer-text:   rgba(245, 238, 223, 0.75);
    --footer-title:  #f5eedf;
    --footer-accent: #d4af37;

    /* Fonts */
    --font-display:  'Playfair Display', Georgia, serif;
    --font-body:     'Libre Baskerville', Georgia, serif;
    --font-ui:       'Montserrat', sans-serif;

    /* Layout */
    --max-width:     1200px;
    --header-height: 0px; /* wordt bij laden gezet door JS */
}


/* ============================================================
   2. RESET & BASIS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
    background-color: var(--paper-dark);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
}

/* Papier-textuur */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9000;
    opacity: 0.5;
}


/* ============================================================
   3. MASTHEAD MET LOGO
   ============================================================ */
.masthead {
    background-color: var(--paper);
    border-bottom: 4px double var(--rule-heavy);
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Bovenste metabalk */
.masthead-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 40px;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-ui);
    font-size: 0.67rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.masthead-meta-left::before { content: '— '; color: var(--rule-heavy); }
.masthead-meta-right::after  { content: ' —'; color: var(--rule-heavy); }

/* Logo-gebied */
.masthead-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 40px 18px;
    gap: 24px;
    position: relative;
}

/* Horizontale lijnen links en rechts van het logo */
.masthead-logo-area::before,
.masthead-logo-area::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule-heavy);
    max-width: 300px;
}

/* Logo-icoon */
.masthead-logo-icon {
    width: 80px;
    height: 80px;
    background-color: var(--ink);
    background-image: url('../images/logo-icon.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;
    flex-shrink: 0;
    border: 3px solid var(--rule-heavy);
}

/* Logo-tekst */
.masthead-logo-text {
    text-align: left;
    line-height: 1;
}
.masthead-logo-text .main-name {
    font-family: var(--font-ui);
    font-weight: 900;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-variant-caps: all-small-caps;
    color: var(--title-color);
    display: block;
    margin-bottom: 4px;
}
.masthead-logo-text .sub-name {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ink-muted);
    display: block;
    text-align: center;
}

.tagline {
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--ink-muted);
    padding-bottom: 14px;
}

/* Navigatiebalk */
.masthead-nav {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--rule);
    background: var(--paper-mid);
}
.masthead-nav a {
    font-family: var(--font-ui);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 10px 24px;
    border-right: 1px solid var(--rule);
    transition: background 0.2s, color 0.2s;
    display: block;
}
.masthead-nav a:first-child { border-left: 1px solid var(--rule); }
.masthead-nav a:hover  { background: var(--paper); color: var(--ink); }
.masthead-nav a.active { background: var(--ink); color: var(--paper); }


/* ============================================================
   4. HAMBURGER & MOBIEL MENU
   ============================================================ */
.hamburger {
    display: none;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--ink);
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.nav-overlay.is-open { display: flex; }
.nav-overlay a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--paper);
    text-decoration: none;
    padding: 16px 40px;
    border-bottom: 1px solid rgba(200,184,154,0.2);
    width: 100%;
    text-align: center;
    transition: color 0.2s, background 0.2s;
}
.nav-overlay a:first-child { border-top: 1px solid rgba(200,184,154,0.2); }
.nav-overlay a:hover  { color: var(--gold-light); background: rgba(255,255,255,0.04); }
.nav-overlay a.active { color: var(--gold-light); }
.nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--paper);
    font-size: 2rem;
    cursor: pointer;
    padding: 4px 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.nav-close:hover { opacity: 1; }


/* ============================================================
   5. FOOTER
   ============================================================ */
.site-footer {
    background-color: var(--footer-bg);
    background-image: linear-gradient(to bottom, var(--footer-mid) 0%, var(--footer-bg) 100%);
    border-top: 3px double var(--rule-heavy);
    position: relative;
    overflow: hidden;
    z-index: 10;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}
.footer-column h3 {
    font-family: var(--font-display);
    color: var(--footer-title);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.35);
}
.footer-column p,
.footer-column li {
    margin-bottom: 0.6rem;
    line-height: 1.8;
    color: var(--footer-text);
    font-family: var(--font-body);
    font-size: 0.88rem;
}
.footer-column ul  { list-style: none; padding: 0; }
.footer-column a   { color: var(--footer-text); text-decoration: none; transition: color 0.25s; }
.footer-column a:hover { color: var(--footer-accent); }
.footer-column address { font-style: normal; color: whitesmoke; }
.footer-column .copyright {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    opacity: 0.55;
    font-family: var(--font-ui);
    letter-spacing: 0.06em;
}
.footer-bottom {
    border-top: 1px solid rgba(200,184,154,0.15);
    padding: 12px 24px;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245,238,223,0.3);
}


/* ============================================================
   6. MODAL
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(26,18,9,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal-content {
    position: relative;
    width: 95%;
    height: 90%;
    background-color: var(--paper);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-content iframe { width: 100%; height: 100%; border: none; }
.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s;
}
.close-btn:hover { background: var(--title-color); }


/* ============================================================
   7. ANIMATIES
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.masthead { animation: fadeUp 0.4s ease both; }


/* ============================================================
   8. RESPONSIVE — gedeeld
   ============================================================ */
@media (max-width: 720px) {
    .masthead-meta    { padding: 7px 16px; font-size: 0.62rem; }
    .masthead-meta-left { display: none; }
    .masthead-logo-area { padding: 16px; gap: 14px; }
    .masthead-logo-icon { width: 56px; height: 56px; }
    .masthead-logo-text .main-name { font-size: 1.2rem; }
    .masthead-nav { display: none; }
    .hamburger    { display: block; }
    .footer-inner { padding: 36px 16px 24px; }
}

@media (max-width: 480px) {
    .masthead-logo-area::before,
    .masthead-logo-area::after { display: none; }
}
