/* ==========================================================================
   TSP Bombeeck theme
   Kleuren uit het logo:
     antraciet #37373a  |  grijs #94969a  |  cyaan #00b5e5
   ========================================================================== */

@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
}

:root {
    --charcoal: #37373a;
    --charcoal-dark: #2b2b2e;
    --gray: #94969a;
    --gray-light: #e6e7e9;
    --cyan: #00b5e5;
    --cyan-dark: #0096be;
    --bg: #f5f6f8;
    --card-bg: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(55, 55, 58, 0.08), 0 4px 14px rgba(55, 55, 58, 0.06);
    --shadow-hover: 0 4px 10px rgba(55, 55, 58, 0.12), 0 10px 28px rgba(55, 55, 58, 0.10);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    /* Ghost custom fonts (Admin -> Design) winnen; anders Space Grotesk + systeemfont */
    --gh-font-heading: "Space Grotesk", var(--font);
    --gh-font-body: var(--font);
    --cut: 16px; /* afgeschuinde hoek op kaarten */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--gh-font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--charcoal);
    background: var(--bg);
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

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

a { color: var(--cyan-dark); text-decoration: none; }
a:hover { color: var(--cyan); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Masthead (logo)
   -------------------------------------------------------------------------- */

.site-masthead {
    background: var(--card-bg);
    border-bottom: 1px solid var(--gray-light);
}

.masthead-inner {
    display: flex;
    justify-content: center;
    padding-top: 22px;
    padding-bottom: 22px;
}

.site-logo img {
    display: block;
    max-height: 62px;
    width: auto;
}

/* --------------------------------------------------------------------------
   Sticky navigation
   -------------------------------------------------------------------------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--charcoal);
    box-shadow: 0 2px 8px rgba(43, 43, 46, 0.25);
}

/* dun cyaan scanlijntje onderlangs de navbar */
.site-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 35%, var(--cyan) 65%, transparent 100%);
    opacity: 0.55;
    pointer-events: none;
}

.site-nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.site-nav .nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.site-nav .nav::-webkit-scrollbar { display: none; }

.site-nav .nav li { flex-shrink: 0; }

.site-nav .nav a {
    position: relative;
    display: block;
    padding: 14px 22px;
    color: #fff;
    font-family: var(--gh-font-heading);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    transition: color 0.15s ease, text-shadow 0.15s ease;
    white-space: nowrap;
}

/* cyaan lijn die van links naar rechts inschuift */
.site-nav .nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 2px;
    background: var(--cyan);
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 100%, 0 100%); /* schuin kantje */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.site-nav .nav a:hover {
    color: var(--cyan);
    text-shadow: 0 0 14px rgba(0, 181, 229, 0.55);
}

.site-nav .nav a:hover::after,
.site-nav .nav .nav-current a::after {
    transform: scaleX(1);
}

.site-nav .nav .nav-current a {
    color: var(--cyan);
}

/* Zoekfunctie in de navbar */

.nav-search {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

#tsp-search-input {
    width: 200px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, width 0.2s ease;
}

#tsp-search-input::placeholder { color: var(--gray); }

#tsp-search-input:focus {
    border-color: var(--cyan);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 14px rgba(0, 181, 229, 0.35);
    width: 260px;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(480px, calc(100vw - 40px));
    max-height: 70vh;
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: 3px;
    border-top: 2px solid var(--cyan);
    box-shadow: var(--shadow-hover), 0 0 18px rgba(0, 181, 229, 0.18);
    z-index: 200;
}

.search-hit {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-light);
}

.search-hit:last-child { border-bottom: none; }

.search-hit:hover { background: var(--bg); }

.search-hit-type {
    display: inline-block;
    color: var(--cyan-dark);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}

.search-hit-title {
    display: block;
    color: var(--charcoal);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.search-hit-snippet {
    display: block;
    color: var(--gray);
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 2px;
}

.search-hit-snippet mark,
.search-hit-title mark {
    background: rgba(0, 181, 229, 0.18);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.search-empty {
    padding: 16px;
    color: var(--gray);
    font-size: 0.9rem;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Homepage: grid links, featured rechts
   -------------------------------------------------------------------------- */

.site-main {
    flex: 1;
    padding: 40px 0 64px;
}

.home-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.post-feed { flex: 1; min-width: 0; position: relative; }

/* Uitgewassen, herhalend logo-watermerk over de hele site.
   position: fixed vult exact het scherm (geen extra scrollruimte) en blijft
   staan terwijl de content eroverheen scrolt; opaque vlakken (kaarten, nav,
   footer) bedekken hem vanzelf. */
body::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: -1;
    background-image: url("../images/logo-tile.png"), url("../images/logo-tile.png");
    background-size: 540px auto, 540px auto;
    background-position: 0 0, 270px 150px; /* tweede laag verspringt: baksteenpatroon */
    background-repeat: repeat, repeat;
    opacity: 0.05;
    transform: rotate(-8deg);
    pointer-events: none;
}

.post-grid, .pagination, .empty-state { position: relative; z-index: 1; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* Post card */

.post-card {
    background: var(--card-bg);
    border-radius: 3px;
    overflow: hidden;
    /* afgeschuinde hoek rechtsboven; schaduw daarom via drop-shadow
       (box-shadow zou door de clip-path worden weggeknipt) */
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
    filter: drop-shadow(0 2px 5px rgba(55, 55, 58, 0.10));
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 6px 14px rgba(55, 55, 58, 0.14)) drop-shadow(0 0 10px rgba(0, 181, 229, 0.22));
}

.post-card-image-link { display: block; }

.post-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--charcoal-dark) 60%, var(--cyan-dark) 160%);
}

.post-card-image.placeholder span {
    color: var(--cyan);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.post-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 16px;
}

.post-card-tag {
    color: var(--cyan-dark);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.post-card-tag::before,
.archive-kicker::before {
    content: "// ";
    opacity: 0.6;
}

.post-card-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    line-height: 1.35;
}

.post-card-title a { color: var(--charcoal); }
.post-card-title a:hover { color: var(--cyan-dark); }

.post-card-excerpt {
    margin: 0 0 14px;
    color: var(--gray);
    font-size: 0.92rem;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

/* Auteur met avatar */

.card-author {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--charcoal);
    font-family: var(--gh-font-body);
    font-size: 0.8rem;
    font-weight: 600;
}

.card-author:hover .card-author-name { color: var(--cyan-dark); }

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--cyan);
    flex-shrink: 0;
}

.author-avatar-lg { width: 32px; height: 32px; }

.author-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    color: var(--gray);
}

.author-avatar-fallback svg { width: 70%; height: 70%; }

.meta-sep { margin: 0 6px; color: var(--gray-light); }

/* Featured column (rechts) */

.featured-col {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
}

.featured-heading {
    margin: 0 0 16px;
    padding-bottom: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--charcoal);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--cyan), transparent 85%) 1;
}

.featured-heading::before {
    content: "\25B8  "; /* ▸ */
    color: var(--cyan);
}

.featured-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--card-bg);
    border-radius: 3px;
    border-left: 4px solid var(--cyan);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    filter: drop-shadow(0 2px 5px rgba(55, 55, 58, 0.10));
    padding: 12px 14px;
    margin-bottom: 14px;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 5px 12px rgba(55, 55, 58, 0.14)) drop-shadow(0 0 9px rgba(0, 181, 229, 0.22));
}

.featured-card-image {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.featured-card-content { min-width: 0; }

.featured-card-title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.featured-card-title a { color: var(--charcoal); }
.featured-card-title a:hover { color: var(--cyan-dark); }

.featured-card-date {
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* kaarten faden kort na elkaar in bij het laden van de pagina */
@media (prefers-reduced-motion: no-preference) {
    .post-card, .featured-card {
        animation: card-in 0.45s ease backwards;
    }
    .post-card:nth-child(1), .featured-card:nth-of-type(1) { animation-delay: 0.03s; }
    .post-card:nth-child(2), .featured-card:nth-of-type(2) { animation-delay: 0.08s; }
    .post-card:nth-child(3), .featured-card:nth-of-type(3) { animation-delay: 0.13s; }
    .post-card:nth-child(4), .featured-card:nth-of-type(4) { animation-delay: 0.18s; }
    .post-card:nth-child(5), .featured-card:nth-of-type(5) { animation-delay: 0.23s; }
    .post-card:nth-child(6), .featured-card:nth-of-type(6) { animation-delay: 0.28s; }
    .post-card:nth-child(7) { animation-delay: 0.33s; }
    .post-card:nth-child(8) { animation-delay: 0.38s; }
    .post-card:nth-child(9) { animation-delay: 0.43s; }
    .post-card:nth-child(n+10) { animation-delay: 0.48s; }
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(14px); }
}

/* Pagination */

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
}

.pagination a {
    background: var(--charcoal);
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

.pagination a:hover { background: var(--cyan-dark); }

.pagination .page-number { color: var(--gray); font-family: var(--font-mono); font-size: 0.82rem; }

/* Empty state */

.empty-state {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 60px 30px;
    text-align: center;
}

.empty-state h2 { margin: 0 0 8px; }
.empty-state p { color: var(--gray); margin: 0; }

/* --------------------------------------------------------------------------
   Archief (tag / auteur)
   -------------------------------------------------------------------------- */

.archive-header { margin-bottom: 32px; }

.archive-kicker {
    color: var(--cyan-dark);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.archive-title { margin: 4px 0 8px; font-size: 2rem; }

.archive-description { color: var(--gray); margin: 0; max-width: 640px; }

/* --------------------------------------------------------------------------
   Artikel
   -------------------------------------------------------------------------- */

.article { max-width: 800px; }

.article-header { text-align: center; margin-bottom: 28px; }

.article-tag {
    display: inline-block;
    color: var(--cyan-dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.article-title {
    margin: 0 0 12px;
    font-size: 2.3rem;
    line-height: 1.2;
}

.article-excerpt {
    color: var(--gray);
    font-size: 1.15rem;
    margin: 0 0 14px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.article-author {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--gh-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal);
}

.article-author:hover span { color: var(--cyan-dark); }

.article-image { margin: 0 0 32px; }

.article-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-image figcaption {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 8px;
}

.article-content { font-size: 1.08rem; }

.gh-content > * + * { margin-top: 1.2em; }

.gh-content h2, .gh-content h3 { margin-top: 1.8em; line-height: 1.3; }

.gh-content a { text-decoration: underline; text-underline-offset: 2px; }

.gh-content blockquote {
    margin: 1.5em 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--cyan);
    color: var(--gray);
    font-style: italic;
}

.gh-content pre {
    background: var(--charcoal-dark);
    color: #eaeaec;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
}

.gh-content code {
    background: var(--gray-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.gh-content pre code { background: none; padding: 0; }

.gh-content img { border-radius: 8px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--gh-font-heading); }

/* Brede en volledige-breedte editor-cards (Koenig) */
.kg-width-wide {
    position: relative;
    width: 100%;
    max-width: 1040px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.kg-width-full img { border-radius: 0; }

.gh-content hr {
    border: none;
    border-top: 1px solid var(--gray-light);
    margin: 2.5em 0;
}

.article-footer { margin-top: 40px; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-pill {
    background: var(--card-bg);
    border: 1px solid var(--gray-light);
    color: var(--charcoal);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tag-pill:hover { border-color: var(--cyan); color: var(--cyan-dark); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--charcoal);
    color: var(--gray);
    margin-top: auto;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--cyan), transparent) 1;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 26px;
    padding-bottom: 26px;
}

.footer-brand { display: flex; flex-direction: column; }

.footer-title { color: #fff; font-weight: 700; }

.footer-tagline {
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--cyan);
    font-family: var(--gh-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: 0 0 16px rgba(0, 181, 229, 0.35);
    transition: text-shadow 0.15s ease, color 0.15s ease;
}

.footer-phone:hover { text-shadow: 0 0 22px rgba(0, 181, 229, 0.7); }

.footer-phone .phone-icon {
    width: 1.05em;
    height: 1.05em;
    flex-shrink: 0;
}

.footer-phone:hover { color: #33c6ec; }

.footer-copy { font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .home-layout { flex-direction: column; }

    .featured-col {
        width: 100%;
        position: static;
        order: -1; /* uitgelicht boven het gewone overzicht op mobiel */
    }

    .site-main { padding-top: 28px; }
}

@media (max-width: 680px) {
    .post-grid { grid-template-columns: 1fr; }

    .site-nav-inner { justify-content: flex-start; padding: 0 10px 0 0; }

    .site-nav .nav a { padding: 13px 16px; font-size: 0.88rem; }

    #tsp-search-input { width: 120px; }
    #tsp-search-input:focus { width: 160px; }

    .search-results { right: -10px; }

    .site-logo img { max-height: 48px; }

    .masthead-inner { padding-top: 16px; padding-bottom: 16px; }

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

    .footer-inner { flex-direction: column; text-align: center; }
}
