/* ═══════════════════════════════════════════════════════════════
   TMB — site stylesheet
   Bootstrap 5 is loaded first; this file overrides/extends it.
   Legacy palette: #2d3e50 (dark navy) · #556666 (body text)
                   #6FBEF3 (nav links) · Lora serif body font
   ═══════════════════════════════════════════════════════════════ */

/* ── Typography & base ───────────────────────────────────────── */
body {
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    line-height: 1.7;
    color: #556666;
    padding-top: 56px; /* offset for fixed navbar */
    background: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', Georgia, serif;
    color: #2d3e50;
}
    h1:focus {
        outline: none;
    }

a { color: #2d3e50; }
a:hover { color: #6FBEF3; }

img { max-width: 100%; height: auto; border: 0; }

/* ── Navbar ──────────────────────────────────────────────────── */
.tmb-navbar {
    background-color: #2d3e50;
    box-shadow: 0 3px 5px rgba(0,0,0,.25);
    padding: 0 0 0 6px;
}

.tmb-brand {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    font-weight: 400;
    color: #fff !important;
    padding: 0;
    line-height: 1.2;
}
.tmb-brand:hover { color: #fff !important; }

.tmb-navbar .nav-link {
    color: #6FBEF3;
    padding: 0.6rem 0.85rem;
    font-family: sans-serif;
    font-size: 0.9rem;
}
.tmb-navbar .nav-link:hover,
.tmb-navbar .nav-link:focus { color: #AECFE5; }
.tmb-navbar .nav-link.active { color: #fff !important; }

/* Edit-mode toggle in navbar (dark background needs a light label) */
.tmb-navbar .form-check-label {
    color: #6FBEF3;
    font-family: sans-serif;
    font-size: 0.9rem;
}
.tmb-navbar .form-check-input:checked {
    background-color: #6FBEF3;
    border-color: #6FBEF3;
}

/* Inline edit controls next to editable list items - position/z-index keep the
   buttons independently clickable when the card/row also has a stretched-link
   (see ContentCard/ContentListItem) that would otherwise capture the click. */
.edit-controls {
    position: relative;
    z-index: 2;
}
.edit-controls .btn {
    padding: 0.05rem 0.35rem;
    font-size: 0.85rem;
    line-height: 1.4;
    vertical-align: middle;
}

/* Hamburger icon bars (replaces Bootstrap's default toggler icon) */
.navbar-toggler {
    border: none;
    background: transparent;
    padding: 6px;
}
.navbar-toggler:focus { box-shadow: none; }
.tmb-toggler-icon {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background-color: #fff;
    border-radius: 1px;
    transform: rotate(0deg) translate(0px, 0px);
    transition: ease all .2s;
}
/* Animate hamburger → X when open */
.navbar-toggler[aria-expanded="true"] .tmb-toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 4px);
}
.navbar-toggler[aria-expanded="true"] .tmb-toggler-icon:nth-child(2) {
    opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .tmb-toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Page layout ─────────────────────────────────────────────── */
.tmb-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 128px); /* changed from 160px */
}

.tmb-footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #888;
}

/* ── Forms & buttons (legacy style on top of Bootstrap) ─────── */
.btn { font-family: Arial, Helvetica, sans-serif; }
.btn-primary    { background-color: #2d3e50; border-color: #2d3e50; }
.btn-primary:hover { background-color: #1a2a38; border-color: #1a2a38; }

.form-control:focus, .form-select:focus {
    border-color: #2d3e50;
    box-shadow: 0 0 0 .2rem rgba(45,62,80,.2);
}

/* ── Admin layout ────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.admin-nav {
    min-width: 200px;
    flex-shrink: 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
}
.admin-nav h2 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }
.admin-nav ul { list-style: none; padding: 0; margin: 0; }
.admin-nav li { margin-bottom: .25rem; }
.admin-nav a { color: #2d3e50; text-decoration: none; font-size: .9rem; }
.admin-nav a:hover, .admin-nav a.active { text-decoration: underline; }
.admin-content { flex: 1; min-width: 0; }

/* ── Public article list ─────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 2rem; }

.article-card {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 1.5rem;
}
.article-card h2, .article-card h3 { margin: 0 0 .25rem; }
.article-card h2 a, .article-card h3 a { color: #2d3e50; text-decoration: none; }
.article-card h2 a:hover, .article-card h3 a:hover { color: #6FBEF3; }

.article-meta { color: #888; font-size: .875rem; margin: 0 0 .5rem; font-style: italic; }
.article-summary { margin: 0 0 .5rem; }
.read-more { font-size: .875rem; }

/* ── Article detail ──────────────────────────────────────────── */
.article-detail-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #2d3e50;
    padding-bottom: 1rem;
}
.article-detail-header h1 { margin: 0 0 .5rem; }
.article-lead { font-size: 1.1rem; color: #556666; font-style: italic; margin: .5rem 0 0; }

.article-body { line-height: 1.75; }
.article-body h2, .article-body h3 { margin-top: 1.5rem; color: #2d3e50; }
.article-body img { max-width: 100%; height: auto; padding: .5em 0; }
.article-body blockquote {
    border-left: 4px solid #2d3e50;
    margin: 1rem 0;
    padding: .5rem 1rem;
    background: #f9f9f9;
    color: #556666;
    font-style: italic;
}
.article-body pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: .875rem;
}
.article-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.article-body table th, .article-body table td {
    border: 1px solid #ddd;
    padding: .4rem .75rem;
}
.article-body table th { background: #f0f0f0; font-weight: 600; }
.article-body img.fl { float: left; padding: 0 1rem 1rem 0; }
.article-body img.fr { float: right; padding: 0 0 1rem 1rem; }

.article-detail-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e5e5e5; }
.article-tags { font-size: .8rem; color: #999; }

/* ── Home page (full-screen layout, bypasses standard Bootstrap nav) ── */

/* Navbar */
.home-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: #2d3e50;
    box-shadow: 0 1px 10px rgba(0,0,0,.25);
    min-height: 50px;
    padding: 0 6px;
    font-family: sans-serif;
}
.home-menu-brand {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
    padding: 4px 0 2px;
    white-space: nowrap;
}
.home-menu-brand:hover { color: #fff; }
.home-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}
.home-menu-list li { display: inline; }
.home-menu-link {
    color: #6FBEF3;
    text-decoration: none;
    padding: 14px 0.85rem;
    display: inline-block;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 34vw;
}
.home-menu-link:hover, .home-menu-link:focus { color: #AECFE5; }

/* Splash / hero */
.splash-container {
    position: fixed;
    top: 50px; left: 0;
    width: 100%;
    height: 75vh;
    z-index: 1;
    overflow: hidden;
    background-color: #3e69ad;
    background-image: url('/images/pelikaan_w2880d.min.jpg');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
}
.splash-fade {
    position: absolute;
    inset: 0;
    background-color: #2d3e50;
    opacity: 0;
}
.splash-subhead {
    position: absolute;
    left: 0; top: 37%;
    padding: 1em;
    color: #fff;
    font-size: 1em;
    letter-spacing: .05em;
    text-shadow: 1px 1px 3px #002;
    max-width: 50vw;
}
.splash-subhead h1 {
    color: #fff;
    font-size: 1.2em;
    text-align: left;
    margin: 0;
}
#slide-in {
    animation: slide-in 2s ease-out;
}
@keyframes slide-in {
    0%   { opacity: 0; transform: translate(40vw, 0); }
    33%  { opacity: 0; transform: translate(40vw, 0); }
    100% { opacity: 1; }
}

/* Content wrapper — slides over splash on scroll */
.content-wrapper {
    position: absolute;
    top: calc(75vh + 50px);
    width: 100%;
    z-index: 2;
    background: #fff;
}

/* Content sections */
.home-content {
    margin: 0 auto;
    padding: 2em 1em 3em;
    max-width: 840px;
}
.home-content h3.content-subhead { color: #1f8dd6; }

/* Parallax section dividers */
.home-parallax {
    width: 100%;
    height: 50vw;
    max-height: 50vh;
    background-color: #555;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: relative;
    /* background-position-y is driven by home-parallax.js */
}
.home-parallax h2 {
    position: absolute;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: .4em .6em;
    color: #fff;
    text-align: center;
    font-size: 2em;
    letter-spacing: .05em;
    text-shadow: 1px 1px 3px #002;
}

/* Contact ribbon */
.home-ribbon {
    background: #2d3e50;
    color: #bbb;
    padding: 1.5em 1em;
    text-align: center;
}
.home-ribbon p { margin: 0; line-height: 2; }
.home-ribbon a, .home-ribbon a:visited { color: #bbb; text-decoration: none; }
.home-ribbon a:hover { color: #eee; text-decoration: underline; }

/* Responsive */
@media (min-width: 48em) {
    .home-menu { justify-content: flex-start; }
    .home-menu-list { margin-left: auto; }
    .splash-subhead { font-size: 1.5em; }
}
@media (min-width: 78em) {
    .splash-subhead { font-size: 2em; }
    .home-parallax h2 { font-size: 3em; }
}
@media (max-width: 350px) {
    .splash-container {
        background-image: url('/images/pelikaan_w640d.min.jpg');
    }
    .hide-xs { display: none; }
}
@media only screen and (orientation: portrait) {
    .splash-container { height: 60vh; }
    .content-wrapper  { top: calc(60vh + 50px); }
}

/* ── Utility ─────────────────────────────────────────────────── */
.body-content { padding-top: 2rem; }
.txt-item { margin-bottom: 1em; }
.txt-item h3 { padding-top: 1.5em; }
.isConcept, .isDeleted { background-color: #f0f0f0; }
.isDeleted, .isCancelled { text-decoration: line-through; }
.isDeceased { font-style: italic; color: #ccc; }

.ar { text-align: right; }
.cl { clear: left; }
.hand { cursor: pointer; }
.w-33 { width: 33.333%; }
.w-50 { width: 50%; }
.w-66 { width: 66.666%; }
.fl { float: left; }
.fr { float: right; }
img.fl { padding: 0 4px 4px 0; }
img.fr { padding: 0 0 4px 4px; }

/* scroll anchor offset */
.anchor { padding-bottom: 60px; display: block; margin-top: -60px; }

.badge { font-family: Arial, Helvetica, sans-serif; white-space: normal; }
.debug div, .debug td { outline: 1px dashed red; }

/* ── TinyMCE renders its own iframe + toolbar ─────────────────── */

/* ── View mode toggle (list/cards) ────────────────────────────── */
[data-view="cards"] .tmb-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
[data-view="list"]  .tmb-items { display: block; }
[data-view="list"]  .tmb-items .tmb-card-only { display: none; }
[data-view="cards"] .tmb-items .tmb-list-only { display: none; }
.avatar-circle { border-radius: 50%; width: 48px; height: 48px; object-fit: cover; }
.avatar-circle-lg { border-radius: 50%; width: 96px; height: 96px; object-fit: cover; }
.tmb-card-noimage { width: 100%; height: 140px; background: #e9ecef; }
.tmb-list-thumb { width: 48px; height: 48px; object-fit: cover; flex: 0 0 auto; }
.tmb-list-thumb-noimage { width: 48px; height: 48px; flex: 0 0 auto; background: #e9ecef; }

/* ── News carousel (C9) ──────────────────────────────────────── */
.tmb-news-carousel .carousel-item { min-height: 320px; }
.tmb-news-carousel-slide {
    display: block;
    min-height: 320px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    text-decoration: none;
}
.tmb-news-carousel-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
}
.tmb-news-carousel-caption h2 { color: #fff; margin-bottom: .25rem; }
.tmb-news-carousel-caption p { margin-bottom: 0; }

/* ── News teasers (C9) ──────────────────────────────────────── */
.tmb-news-teaser-media { display: block; flex: 0 0 33%; max-width: 33%; }
.tmb-news-teaser-img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; border-radius: .25rem; }
.tmb-news-teaser-hero { width: 100%; height: auto; object-fit: cover; max-height: 360px; border-radius: .25rem; }

/* ── Recent-toegevoegd strips (C9) ───────────────────────────── */
.tmb-strip-card { display: block; color: inherit; }
.tmb-strip-card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .25rem; }

/* ── Media overview/detail + archief (C11) ───────────────────── */
.tmb-fade-carousel { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .25rem; background: #e9ecef; }
.tmb-fade-carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}
.tmb-media-thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.tmb-media-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: .25rem; }
.tmb-media-imageset { display: flex; flex-direction: column; gap: 1rem; }
.tmb-media-imageset-img { width: 100%; max-width: 800px; height: auto; border-radius: .25rem; }
.tmb-archief-group summary { cursor: pointer; margin-bottom: .75rem; }

@media (max-width: 767.98px) {
    .tmb-news-teaser-media { max-width: 100%; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
    .tmb-navbar .navbar-collapse {
        background-color: #2d3e50;
        padding: .5rem 0;
    }
}

@media (max-width: 576px) {
    .admin-layout { flex-direction: column; }
    .admin-nav { width: 100%; }
}

/* Mobile composition: phones, and tablets held in portrait. */
@media (max-width: 767.98px), (orientation: portrait) and (max-width: 1024px) {
    .tmb-items { grid-template-columns: 1fr !important; }
    .news-teaser { flex-direction: column !important; }     /* ImageLeft/Right stack */
    .news-teaser img { width: 100% !important; }
    .carousel-caption { position: static; background: var(--bs-dark); }
    .view-mode-toggle { display: none; }                     /* cards-only on mobile */
    .edit-controls .btn { padding: .375rem .75rem; }         /* touch targets */
}

/* Whole card/row is clickable (stretched-link on the title anchor, see
   ContentCard.razor/ContentListItem.razor) - signal that with a pointer cursor
   and a subtle hover lift, matching legacy's tbody.hand rows. */
.tmb-items .card, .tmb-items .d-flex { cursor: pointer; transition: box-shadow .15s ease; }
.tmb-items .card:hover { box-shadow: 0 .25rem .75rem rgba(0,0,0,.1); }
.tmb-items .d-flex:hover { background-color: #f8f9fa; }

/* ── Event badge cascade (Agenda cards/list + modal, see EventBadges.razor) ──── */
.event-badges .badge { margin: 0 .25rem .25rem 0; }
.event-badges .badge:last-child { margin-right: 0; }

/* Prev/next arrows either side of the event modal, ported from legacy site.css's
   .prev-icon-circle/.next-icon-circle (same position/size values). */
.prev-icon-circle, .next-icon-circle {
    padding: 10px 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1056;
}
.prev-icon-circle { left: 2vw; }
.next-icon-circle { right: 2vw; }
@media (max-width: 767.98px) {
    .prev-icon-circle, .next-icon-circle { display: none; }
}

/* ── Detail modals (Agenda.razor's event modal, Broeders.razor's person modal) —
   native <dialog class="tmb-native-modal">, opened via .showModal() in tmb.js
   (tmbInitNativeModals) rather than bootstrap.Modal(). Bootstrap's .modal-dialog/
   .modal-content classes still give us the visual card; the shared rules below make the
   outer <dialog> itself behave like a Bootstrap overlay (display gated on the native
   [open] attribute, not a JS-toggled .show/.d-block class) and reset the browser's own
   <dialog> UA styling (border/padding/background). ── */
.tmb-native-modal {
    display: none;
    z-index: 1055;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    max-width: none;
    max-height: none;
}
.tmb-native-modal[open] { display: block; }
.tmb-native-modal::backdrop { background-color: rgba(0, 0, 0, .5); cursor: pointer; }

.tmb-event-modal .modal-title, .tmb-person-modal .modal-title { font-family: 'Lora', Georgia, serif; color: #2d3e50; }
.tmb-event-modal label, .tmb-person-modal label { color: #2d3e50; }
.tmb-event-modal .event-body img { max-width: 100%; height: auto; }

/* Markdown-sourced bio text (Broeders.razor's person-detail modal) is rendered through
   Markdig to HTML, but Markdig collapses the author's own blank lines/line breaks into
   normal HTML paragraph flow — .mark-down-content preserves them as typed instead. */
.mark-down-content {
    white-space: pre;
    line-height: normal;
}
