/* ================================================================
   frontstage/pwa — gedeelde statische CSS (index.php + museum.php)
   Let op: dit is een ANDER bestand dan mainstage/css/app.css. frontstage
   heeft al css/shared/tokens.css (platform-brede tokens); dit bestand komt
   ernaast voor de pwa/-submap, die zijn eigen kopie van diezelfde 9 tokens
   gebruikte (niet aangepast om ook shared/css/tokens.css te gaan laden —
   dat is een aparte, grotere beslissing, zie mainstage taak 3 stap 6).
   Per-museum kleur (museum.php's hero/CTA) loopt via --brand/--brand-ink,
   gezet in een klein inline :root-blokje per pagina.
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
    --ink:       #1C2B2D;
    --ink-soft:  #4A5B5D;
    --bg:        #FAF8F5;
    --sand:      #E8E1D6;
    --sand-line: #D8CEBE;
    --teal:      #3D6B5C;
    --teal-deep: #2A4B40;
    --teal-tint: #E4ECE8;
    --radius:    12px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* === gedeeld navigatie-skelet, met page-specifieke scoping === */
/* .fs-nav / .fs-nav-brand / .fs-section / .fs-langs betekenen structureel iets
   anders op de lijstpagina (index.php) dan op de detailpagina (museum.php) —
   vandaar body.fs-page-list / body.fs-page-detail i.p.v. bare selectors. */
body.fs-page-list .fs-nav,
body.fs-page-detail .fs-nav {
    position: sticky; top: 0; z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--sand-line);
    padding: .75rem 1.25rem;
    display: flex; align-items: center;
}
body.fs-page-list .fs-nav { gap: .75rem; }
body.fs-page-detail .fs-nav { gap: 1rem; }

/* index.php: klikbaar logo+naam-blok linksboven */
body.fs-page-list .fs-nav-brand {
    display: inline-flex; align-items: center; gap: .5rem;
    text-decoration: none;
    font-size: .95rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em;
    -webkit-tap-highlight-color: transparent;
}
body.fs-page-list .fs-nav-brand:hover { color: var(--teal); }
body.fs-page-list .fs-nav-brand-icon { height: 28px; width: auto; display: block; flex-shrink: 0; }
body.fs-page-list .fs-nav-sub { font-size: .8rem; color: var(--ink-soft); }

/* museum.php: platte tekst-label, geen link/icoon */
body.fs-page-detail .fs-nav-brand { font-size: .9rem; font-weight: 700; color: var(--ink-soft); }

/* === index.php (museumlijst) === */

/* Page header */
.fs-page-header { padding: 2.5rem 1.25rem 0; max-width: 60rem; margin: 0 auto; }
.fs-eyebrow {
    font-size: .75rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--teal); margin-bottom: .5rem;
}
.fs-page-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700;
    letter-spacing: -.03em; line-height: 1.15;
}
.fs-page-lead {
    margin-top: .75rem; font-size: 1rem; color: var(--ink-soft); max-width: 44rem;
}

/* Tabs */
.fs-tabs-wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.25rem; }
.fs-tabs {
    display: flex; border-bottom: 1px solid var(--sand-line); margin-top: 2rem;
}
.fs-tab {
    padding: .6rem 1.25rem; font-size: .9rem; font-weight: 600;
    color: var(--ink-soft); cursor: pointer; border: none; background: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.fs-tab:hover { color: var(--teal); }
.fs-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.fs-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.3em; height: 1.3em; border-radius: 99px;
    background: var(--sand); font-size: .7rem; font-weight: 700;
    margin-left: .35rem; padding: 0 .3em; color: var(--ink-soft);
}
.fs-tab.active .fs-tab-count { background: var(--teal-tint); color: var(--teal); }

/* index.php: tab-paneel (verborgen tot .visible) */
body.fs-page-list .fs-section { display: none; max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }
body.fs-page-list .fs-section.visible { display: block; }

.fs-grid {
    display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 540px) { .fs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .fs-grid { grid-template-columns: repeat(3, 1fr); } }

/* Card */
.fs-card {
    background: var(--bg); border: 1px solid var(--sand-line);
    border-radius: calc(var(--radius) * 1.5);
    overflow: hidden; display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.fs-card:hover {
    box-shadow: 0 6px 24px rgba(28,43,45,.1);
    transform: translateY(-2px);
}

/* Card header — branded */
.fs-card-header {
    padding: 1rem 1.25rem;
    display: flex; flex-direction: row;
    align-items: center; justify-content: space-between; gap: .75rem;
}
.fs-card-header-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.fs-card-name {
    font-size: 1rem; font-weight: 700; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fs-card-city { font-size: .75rem; opacity: .8; }
.fs-card-logo {
    width: 44px; height: 44px; border-radius: 6px; object-fit: contain;
    flex-shrink: 0; background: rgba(255,255,255,.18); padding: 3px;
}
.fs-card-logo-initials {
    width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0;
    background: rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; font-weight: 700;
}

/* Card body */
.fs-card-body {
    padding: .875rem 1.25rem; flex: 1;
    display: flex; flex-direction: column; gap: .625rem;
    position: relative;
    min-height: 7rem;
}
.fs-card-body.has-photo {
    background-size: cover;
    background-position: center;
}
.fs-card-body.has-photo::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,.72) 100%);
}
.fs-card-body.has-photo > * { position: relative; z-index: 1; }
.fs-card-body.has-photo .fs-lang-label,
.fs-card-body.has-photo .fs-tour-item { color: rgba(255,255,255,.85); }
.fs-card-body.has-photo .fs-tour-item::before { color: #7FC4B0; }
.fs-card-body.has-photo .fs-tour-more { color: #A8D9CC; }

/* index.php: museumkaart-taalrij */
body.fs-page-list .fs-langs {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.fs-lang-flags { display: flex; gap: .1rem; }
.fs-lang-flag  { font-size: .95rem; line-height: 1; }
.fs-lang-label { font-size: .75rem; color: var(--ink-soft); }

/* Tours (kaart-lijstje op index.php) */
.fs-tours { display: flex; flex-direction: column; gap: .15rem; }
.fs-tour-item {
    font-size: .8rem; color: var(--ink-soft);
    display: flex; align-items: baseline; gap: .3rem;
}
.fs-tour-item::before { content: '›'; color: var(--teal); font-weight: 600; flex-shrink: 0; }
.fs-tour-more { font-size: .75rem; color: var(--teal); font-weight: 500; }

/* Card footer */
.fs-card-foot {
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--sand-line);
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.fs-price-badge {
    font-size: .78rem; font-weight: 600; letter-spacing: .01em;
    padding: .2em .55em; border-radius: 4px;
}
.fs-price-badge-free { background: #D6F0E4; color: #1A6B40; }
.fs-price-badge-paid { background: var(--teal-tint); color: var(--teal-deep); }

.fs-card-link {
    font-size: .8rem; font-weight: 600; color: var(--teal);
    text-decoration: none; white-space: nowrap;
}
.fs-card-link:hover { color: var(--teal-deep); }

/* Empty */
.fs-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); font-size: .95rem; }

/* === museum.php (museumdetail) === */

.fs-nav-back {
    font-size: .85rem; font-weight: 600; color: var(--teal);
    text-decoration: none; white-space: nowrap;
}
.fs-nav-back:hover { color: var(--teal-deep); }

.fs-share-btn {
    margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
    background: var(--teal); border: 1px solid var(--sand-line); border-radius: 99px;
    padding: .4em .9em; font-size: .8rem; font-weight: 600; color: var(--sand-line);
    cursor: pointer; transition: background .15s; font-family: inherit;
}
.fs-share-btn:hover { background: var(--sand-line); }
.fs-share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.fs-share-btn.is-copied { background: var(--teal-tint); color: var(--teal-deep); }

/* Hero header */
.fs-hero {
    background: var(--brand); color: var(--brand-ink);
    padding: 2rem 1.25rem;
}
.fs-hero-inner {
    max-width: 60rem; margin: 0 auto;
    display: flex; align-items: center; gap: 1.25rem;
}
.fs-hero-logo {
    width: 72px; height: 72px; border-radius: 10px; object-fit: contain;
    flex-shrink: 0; background: rgba(255,255,255,.18); padding: 4px;
}
.fs-hero-logo-initials {
    width: 72px; height: 72px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700;
}
.fs-hero-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.fs-hero-name {
    font-size: clamp(1.2rem, 4vw, 1.75rem); font-weight: 700;
    letter-spacing: -.02em; line-height: 1.15;
}
.fs-hero-location { font-size: .9rem; opacity: .8; }

/* Content */
.fs-content { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 5rem; }

.fs-grid-2 {
    display: grid; grid-template-columns: 1fr; gap: 1.25rem;
}
@media (min-width: 640px) {
    .fs-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* museum.php: informatiekaart (Contact/Openingstijden/...) */
body.fs-page-detail .fs-section {
    background: var(--bg); border: 1px solid var(--sand-line);
    border-radius: calc(var(--radius) * 1.5); padding: 1.25rem;
}
.fs-section-title {
    font-size: .75rem; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--teal); margin-bottom: .875rem;
}

/* Info rows */
.fs-info-list { display: flex; flex-direction: column; gap: .5rem; }
.fs-info-row { display: flex; flex-direction: column; gap: .1rem; }
.fs-info-label { font-size: .75rem; color: var(--ink-soft); font-weight: 500; }
.fs-info-value { font-size: .9rem; color: var(--ink); }
.fs-info-value a { color: var(--teal); text-decoration: none; }
.fs-info-value a:hover { text-decoration: underline; }

/* Opening hours */
.fs-hours { font-size: .875rem; line-height: 1.7; white-space: pre-line; color: var(--ink); }

/* Description */
.fs-description { font-size: .925rem; color: var(--ink); line-height: 1.65; }

/* museum.php: taal-pillen */
body.fs-page-detail .fs-langs { display: flex; flex-wrap: wrap; gap: .5rem; }
.fs-lang-pill {
    display: flex; align-items: center; gap: .35rem;
    background: var(--sand); border-radius: 99px;
    padding: .25em .65em; font-size: .8rem; color: var(--ink-soft);
}

/* Tour cards */
.fs-tour-grid {
    display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 640px) {
    .fs-tour-grid { grid-template-columns: repeat(2, 1fr); }
}

.fs-tour-card {
    background: var(--bg); border: 1px solid var(--sand-line);
    border-radius: calc(var(--radius) * 1.5); overflow: hidden;
    display: flex; flex-direction: column;
}

.fs-tour-thumb {
    height: 160px; flex-shrink: 0;
    background-size: cover; background-position: center;
    background-color: var(--sand);
    position: relative;
}

.fs-tour-no-photo {
    display: flex; align-items: center; justify-content: center;
    color: var(--sand-line);
}

.fs-tour-body { padding: 1rem; flex: 1; }
.fs-tour-title { font-weight: 600; font-size: 1rem; margin-bottom: .2rem; }
.fs-tour-tagline { font-size: .875rem; color: var(--ink-soft); margin-bottom: .4rem; line-height: 1.45; }
.fs-tour-meta {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); margin-top: .4rem;
}
.fs-tour-flags { font-size: 1.05rem; line-height: 1; letter-spacing: .08em; }

.fs-audience-badge {
    display: inline-block; padding: .15em .55em; border-radius: 20px;
    font-size: .72rem; font-weight: 600;
}
.fs-audience-children { background: #E6F4EF; color: #1A6B3C; }

/* Social */
.fs-socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.fs-social-link {
    display: inline-block;
    background: var(--sand); border-radius: var(--radius);
    padding: .35em .75em; font-size: .8rem; font-weight: 500;
    color: var(--ink); text-decoration: none;
    transition: background .15s;
}
.fs-social-link:hover { background: var(--sand-line); }

/* PWA CTA */
.fs-cta {
    background: var(--brand); color: var(--brand-ink);
    border-radius: calc(var(--radius) * 1.5);
    padding: 1.5rem 1.25rem;
    display: flex; flex-direction: column; gap: 1.25rem;
    align-items: flex-start;
}
.fs-cta-text { display: flex; flex-direction: column; gap: .35rem; }
.fs-cta-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.fs-cta-sub   { font-size: .85rem; opacity: .85; }

.fs-cta-qr { display: none; }
.fs-cta-qr canvas {
    display: block; border-radius: 10px;
    background: #fff; padding: 6px;
    width: 140px; height: 140px;
}
.fs-cta-btn {
    display: inline-block;
    background: var(--brand-ink); color: var(--brand);
    border-radius: var(--radius); padding: .65em 1.4em;
    font-size: .9rem; font-weight: 700; text-decoration: none;
    letter-spacing: -.01em; transition: opacity .15s;
}
.fs-cta-btn:hover { opacity: .88; }

@media (min-width: 640px) {
    .fs-cta {
        flex-direction: row; align-items: center;
        justify-content: space-between;
    }
    .fs-cta-qr { display: block; flex-shrink: 0; }
}

/* Full-width card (description, CTA) */
.fs-full { margin-top: 1.25rem; }
