
/* Skip navigation link — off-screen until focused */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: var(--wtn-primary);
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.skip-link:focus {
    top: 1rem;
}

html, body {
    height: 100%;
    overscroll-behavior: none; /* Prevent bounce/scroll chaining */
    touch-action: pan-y; /* allow only vertical scrolling */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}
body {
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
    max-width: 840px !important;
}

header .container,
nav .container,
footer .container-lg {
    max-width: 840px !important;
}

.input-group .form-control {
    max-width: 200px;
}



/* Search box in header — white in light mode */
header .form-control {
    background-color: #ffffff;
    border-color: var(--wtn-primary);
    color: #000;
}
header .form-control::placeholder {
    color: #666;
}
header .form-control:focus {
    border-color: var(--wtn-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 74, 117, 0.25);
}



/* Custom theme colors to match WTN */
:root {
    --wtn-primary: #1a4a75;
    --wtn-accent: #EEE090;
    --wtn-footer-bg: #000;
    --wtn-footer-text: #fff;
}
.navbar {
    background-color: white;
    color: var(--wtn-primary);
}
.navbar .nav-link {
    color: var(--wtn-primary)  !important;
}
.navbar .nav-link:hover {
    color: var(--wtn-primary) !important;
}
header {
    background-color: white;
    color: var(--wtn-primary);
}
body {
    background-color: var(--wtn-accent);
    background-image: linear-gradient(180deg, #fdf9e8 0%, #EEE090 100%);
    background-attachment: fixed;
    color: black;
}
footer {
    background-color: var(--wtn-footer-bg);
    color: var(--wtn-footer-text);
}


/* Top header (white background) */
.top-header {
    background-color: #ffffff;
    padding: 0.5rem 0;
}

/* Blue headings */
h1, h2, h3, h4, h5, h6, dt {
    color: var(--wtn-primary);
}

/* Black footer */
footer {
    background-color: #000000;
    padding: 1rem 0;
}

dl, dd {
    margin-left: 1rem;
}

a, a:hover {
    color: var(--wtn-primary);
    text-decoration: underline;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    text-decoration: none;
    color: inherit;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    text-decoration: underline;
    color: var(--wtn-primary);
}


.hero-image img {
    max-height: 400px;
    object-fit: contain;
}

q, blockquote {
    quotes: "“" "”" "‘" "’";
}

blockquote {
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0; /* tighter look if only one paragraph */
}

blockquote footer {
    font-size: 0.875rem;
    color: #6c757d; /* Bootstrap secondary text color */
}

blockquote p::before {
    content: open-quote;
    font-size: 2rem;
    line-height: 0;
    vertical-align: -0.4rem;
    color: var(--wtn-primary); /* WTN blue */
    margin-right: 0.25rem;
}

blockquote p::after {
    content: close-quote;
    font-size: 2rem;
    line-height: 0;
    vertical-align: -0.4rem;
    color: var(--wtn-primary); /* WTN blue */
    margin-left: 0.25rem;
}

.pagination .page-link {
    color: var(--wtn-primary);
}
.pagination .page-item.active .page-link {
    background-color: var(--wtn-primary);
    color: #fff;
}

/* Apply WTN primary color to all outline buttons */
.btn-outline-primary {
    color: var(--wtn-primary);
    border-color: var(--wtn-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--wtn-primary) !important;
    border-color: var(--wtn-primary) !important;
    color: #fff;
}

.btn-primary {
    background-color: var(--wtn-primary);
    border-color: var(--wtn-primary);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--wtn-primary);
    border-color: var(--wtn-primary);
    filter: brightness(125%);
    text-decoration: none;
}

/* ── Transitions & hover states ─────────────────────────────────────────── */

/* 1. Button transitions */
.btn {
    transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, filter 0.5s ease !important;
}


/* 3. Archive item hover lift */
.archive-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.archive-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 4. Card hover lift */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}


/* Home page hero */
.wtn-hero {
    background: linear-gradient(135deg, #1a4a75 0%, #2a6aaa 100%);
    color: #fff !important;
}
.wtn-hero h1, .wtn-hero p {
    color: #fff !important;
}
.wtn-hero a:not(.btn) {
    color: #fff !important;
}

/* Podlove player — centre within container */
#podlove-player {
    max-width: 950px;
    margin: 0 auto;
}

/* Archive lists — shared styles (editions + magazines) */
.archive-list {
    list-style: none;
    padding: 0.25rem 0 0.75rem 0;
    margin: 0;
}
.archive-item {
    padding: 0.5rem 0;
}
.archive-title {
    margin: 0 0 0.1rem 0;
}
.archive-date {
    display: block;
    font-size: 0.85rem;
    color: #555;
}
.archive-desc {
    margin: 0.2rem 0 0 0;
    font-size: 0.875rem;
    color: #444;
}
.archive-feed-link {
    margin-top: 2rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--wtn-primary);
    font-size: 0.9rem;
}


/* ============================================================
   Dark mode
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --wtn-primary: #5b9ec9;       /* bolder blue for dark bg */
        --wtn-accent: #1e1e1e;
        --wtn-footer-bg: #111;
        --wtn-footer-text: #ccc;
    }

    body {
        background-color: #1e1e1e;
        background-image: none;
        color: #e8e8e8;
    }

    /* Keep header yellow in dark mode — warm contrast with dark body */
    header, .top-header, .navbar {
        background-color: #EEE090 !important;
        border-bottom-color: #c8ba50 !important;
    }

    /* Header links stay dark blue on yellow */
    header a, .navbar .nav-link {
        color: #1a4a75 !important;
    }

    .dropdown-menu {
        background-color: #2a2a2a;
        border-color: #444;
    }

    .dropdown-item {
        color: #e8e8e8;
    }

    .dropdown-item:hover {
        background-color: #333;
        color: #fff;
    }

    h1, h2, h3, h4, h5, h6, dt {
        color: var(--wtn-primary);
    }

    a, a:hover {
        color: var(--wtn-primary);
    }

    h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
        color: inherit;
    }

    /* Search box in header stays yellow in dark mode */
    header .form-control {
        background-color: #EEE090;
        border-color: #1a4a75;
        color: #1a4a75;
    }
    header .form-control::placeholder {
        color: #1a4a75;
        opacity: 0.7;
    }
    header .form-control:focus {
        background-color: #fff;
        color: #000;
    }

    /* Forms */
    .form-control {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e8e8e8;
    }

    .form-control:focus {
        background-color: #333;
        color: #e8e8e8;
        border-color: var(--wtn-primary);
    }

    /* Main content buttons */
    .btn-outline-secondary {
        color: #aaa;
        border-color: #555;
        background-color: #2a2a2a;
    }

    .btn-outline-secondary:hover {
        background-color: #444;
        color: #fff;
    }

    .btn-primary {
        background-color: var(--wtn-primary);
        border-color: var(--wtn-primary);
        color: #fff;
    }

    .btn-outline-primary {
        color: var(--wtn-primary);
        border-color: var(--wtn-primary);
    }

    .btn-outline-primary:hover,
    .btn-outline-primary:active,
    .btn-outline-primary:focus {
        background-color: var(--wtn-primary);
        border-color: var(--wtn-primary);
        color: #fff;
    }

    /* Pagination */
    .pagination .page-link {
        background-color: #2a2a2a;
        border-color: #444;
        color: var(--wtn-primary);
    }

    .pagination .page-item.active .page-link {
        background-color: var(--wtn-primary);
        border-color: var(--wtn-primary);
        color: #fff;
    }

    .pagination .page-item.disabled .page-link {
        background-color: #1e1e1e;
        border-color: #333;
        color: #666;
    }

    /* Bootstrap cards (search results, etc.) */
    .card {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e8e8e8;
    }

    .card-title a {
        color: var(--wtn-primary);
    }

    /* Accordion (editions archive) */
    .accordion-item {
        background-color: #2a2a2a;
        border-color: #444;
    }
    .accordion-button {
        background-color: #2a2a2a;
        color: #e8e8e8;
    }
    .accordion-button:not(.collapsed) {
        background-color: #333;
        color: var(--wtn-primary);
        box-shadow: none;
    }
    .accordion-button::after {
        filter: invert(1);
    }

    /* Ensure muted text is visible in dark mode */
    .text-muted {
        color: #aaa !important;
    }

    /* Archive lists */
    .archive-date {
        color: #999;
    }

    .archive-desc {
        color: #bbb;
    }

    .archive-feed-link {
        border-top-color: var(--wtn-primary);
    }

    /* Footer */
    footer {
        background-color: #111;
        color: #ccc;
    }

    footer a {
        color: #aaa;
    }
}

/* ── Guide screenshots ──────────────────────────────────────────────────── */

/* Prevent screenshots from overflowing the content column */
main img {
    max-width: 100%;
    height: auto;
}
