/*
 * Slajder rodzin — pocztówka.
 *
 * Tło stage: papier sepia z subtelną teksturą.
 * Slajd: pocztówka z passe-partout, hero z obrączkami, lista dzieci linijkowa,
 *        3 klikalne kafle (galeria, notatki, mapka) — wszystkie elementy
 *        klikalne otwierają modale (pliki: GLightbox + własny).
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

.gramps-fs {
    --fs-paper: #faf6ee;
    --fs-paper-dark: #efe5d2;
    --fs-paper-edge: #d8c8a8;
    --fs-ink: #3b2f23;
    --fs-ink-soft: #6b5a45;
    --fs-muted: #8a7860;
    --fs-accent: #8a4b2a;        /* burgund stary */
    --fs-accent-soft: #c98e6c;
    --fs-gold: #b08840;
    --fs-rose: #b56a73;
    --fs-card-bg: rgba(255, 252, 245, 0.96);
    --fs-shadow: 0 24px 60px rgba(60, 40, 20, 0.22);
    --fs-radius: 16px;
    --fs-rings-img: url('img/wedding-rings.avif');
    --fs-card-height: 668px;
    --fs-section-hero: 44%;
    --fs-section-places: 17%;
    --fs-section-kids: 23%;
    --fs-section-actions: 16%;

    position: relative;
    color: var(--fs-ink);
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    /* Slajder sam w sobie jest przezroczysty — tło jest na .gramps-story (poniżej) */
    padding: 8px 0 32px;
    overflow: clip;
    min-height: min(820px, calc(100vh - 150px));
}

/* Tło kaszubskie pod całym shortcode'em [gramps_story] — wypełnia teraz cały .mdb-main
   (motyw mdb-hestia.css ma .mdb-main z padding/margin/bg = 0) */
.gramps-story {
    --gramps-story-bg-width: max(100vw, calc((100vh - 112px) * 1.7778));

    position: relative;
    background: #efe5d2;
    min-height: calc(100vh - 112px);
    padding: 22px clamp(16px, 4vw, 48px) 40px;
    overflow-anchor: none;
}
.gramps-story::before {
    content: '';
    position: absolute;
    inset: 0;
    width: auto;
    transform: none;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse at 50% 50%, rgba(255, 252, 245, 0.18) 0%, rgba(255, 252, 245, 0) 60%),
        linear-gradient(180deg, rgba(245, 234, 210, 0.18) 0%, rgba(218, 195, 155, 0.32) 100%),
        url('img/kaszuby-bg.jpg');
    background-position:
        center top,
        center top,
        center top;
    background-repeat:
        no-repeat,
        no-repeat,
        repeat-y;
    background-size:
        auto,
        auto,
        var(--gramps-story-bg-width) auto;
    z-index: 0;
}
.gramps-story > * { position: relative; z-index: 1; }

.gramps-story > .gramps-story__segments {
    z-index: 800;
}

.gramps-story > .gramps-story__panes {
    z-index: 2;
}

.gramps-fs > * { position: relative; z-index: 1; }

.gramps-fs__loading,
.gramps-fs__empty,
.gramps-fs__error {
    min-height: min(760px, calc(100vh - 180px));
    display: grid;
    place-items: center;
    align-content: center;
    padding: 48px 20px;
    text-align: center;
    color: var(--fs-ink-soft);
    font-style: italic;
    font-size: 15px;
}
.gramps-fs__error { color: #7a2828; }

@media (max-width: 767px) {
    .gramps-fs {
        min-height: min(620px, calc(100vh - 130px));
    }

    .gramps-fs__loading,
    .gramps-fs__empty,
    .gramps-fs__error {
        min-height: min(560px, calc(100vh - 150px));
    }
}

/* ====================== Pasek rodziców (parents-bar) ====================== */
.gramps-fs__bar {
    max-width: 1100px;
    margin: 0 auto 14px;
    padding: 0 16px;
    display: grid;
    gap: 10px;
}
.gramps-fs__bar--parents { grid-template-columns: 1fr 1fr; }

.gramps-fs__chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid rgba(60, 40, 20, 0.18);
    border-radius: 10px;
    background: var(--fs-paper);
    font-family: 'Lora', Georgia, serif;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    color: var(--fs-ink);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
    min-height: 60px;
    box-shadow: 0 2px 8px rgba(60, 40, 20, 0.06);
}
.gramps-fs__chip:hover {
    border-color: var(--fs-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(138, 75, 42, 0.18);
}
.gramps-fs__chip--ghost {
    color: var(--fs-muted);
    cursor: default;
    background: transparent;
    border-style: dashed;
    box-shadow: none;
}
.gramps-fs__chip--ghost:hover {
    border-color: rgba(60, 40, 20, 0.18);
    transform: none;
    box-shadow: none;
}
.gramps-fs__chip-kicker {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fs-accent);
    font-family: 'Cormorant Garamond', serif;
}
.gramps-fs__chip-title {
    font-weight: 600;
    color: var(--fs-ink);
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.gramps-fs__chip-meta {
    color: var(--fs-muted);
    font-size: 11px;
    font-style: italic;
}

/* ====================== Slider container ====================== */
.gramps-fs__viewport {
    position: relative;
    padding: 0 8px;
    overflow: clip;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.gramps-fs__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px; height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(60, 40, 20, 0.2);
    background: var(--fs-paper);
    color: var(--fs-accent);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(60, 40, 20, 0.18);
    font-size: 22px;
    line-height: 1;
    font-family: 'Cormorant Garamond', serif;
}
.gramps-fs__nav:hover { color: var(--fs-ink); background: #fffdf6; }
.gramps-fs__nav--prev { left: 4px; }
.gramps-fs__nav--next { right: 4px; }
@media (min-width: 768px) { .gramps-fs__nav { display: flex; } }

.gramps-fs__swiper {
    overflow: visible;
    margin: 0 auto;
    max-width: 1200px;
    padding: 12px 0 4px;
}

/* ====================== Karta rodziny — POCZTÓWKA ====================== */
.gramps-fs__card {
    box-sizing: border-box;
    background: var(--fs-card-bg);
    border-radius: var(--fs-radius);
    box-shadow: var(--fs-shadow);
    overflow: hidden;
    position: relative;
    /* Pseudo-pasek "passe-partout" wewnętrzny */
    padding: 14px;
    background:
        linear-gradient(var(--fs-card-bg), var(--fs-card-bg)) padding-box,
        linear-gradient(135deg, #d9c4a0, #b08840 50%, #d9c4a0) border-box;
    border: 1.5px double rgba(176, 136, 64, 0.55);
    height: var(--fs-card-height);
}
.gramps-fs__card::before {
    /* Pieczęć "rok X" w lewym górnym narożniku — subtelna */
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(176, 136, 64, 0.5), transparent);
    pointer-events: none;
}

.gramps-fs__card-inner {
    box-sizing: border-box;
    background: var(--fs-paper);
    border-radius: 8px;
    height: 100%;
    display: grid;
    grid-template-rows:
        minmax(0, var(--fs-section-hero))
        minmax(0, var(--fs-section-places))
        minmax(0, var(--fs-section-kids))
        minmax(0, var(--fs-section-actions));
    padding: 20px 22px 16px;
    border: 1px solid rgba(176, 136, 64, 0.18);
    overflow: hidden;
}

/* Hero — para z obrączkami pośrodku, awatary obok obrączek, tekst na zewnątrz */
.gramps-fs__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
    gap: 6px 14px;
    align-items: center;
    min-height: 0;
    overflow: hidden;
    padding: 4px 4px 12px;
    border-bottom: 1px solid rgba(176, 136, 64, 0.25);
}

/* Awatar — PNG z owalną ramą wewnątrz pliku, bez ramki/cienia/tła */
.gramps-fs__partner-photo {
    width: 142px; height: 208px;
    background: transparent center / contain no-repeat;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    color: transparent;
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px; font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
    --fs-avatar-transform: scaleX(1);
    transform: var(--fs-avatar-transform);
    overflow: hidden;
    border-radius: 8px;
}
.gramps-fs__partner-photo:hover { transform: var(--fs-avatar-transform) scale(1.03); }
.gramps-fs__partner-photo--framed {
    width: 142px;
    height: 208px;
    border-radius: 0;
    background-image: none !important;
    box-shadow: none;
}
.gramps-fs__partner-photo--framed::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: url('img/avatar-empty-frame.png') center / contain no-repeat;
}
.gramps-fs__partner-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}
.gramps-fs__partner-photo-crop {
    position: absolute;
    z-index: 1;
    left: 9.2%;
    top: 7.7%;
    display: block;
    width: 81.9%;
    height: 84.5%;
    background-repeat: no-repeat;
    border-radius: 48% / 42%;
    overflow: hidden;
}
.gramps-fs__partner-photo--m { background-image: url('img/avatar-male.png'); }
.gramps-fs__partner-photo--f { background-image: url('img/avatar-female.png'); }
.gramps-fs__partner-photo--m:not(.gramps-fs__partner-photo--framed),
.gramps-fs__partner-photo--f:not(.gramps-fs__partner-photo--framed) {
    --fs-avatar-transform: scaleX(-1);
}
.gramps-fs__partner-photo--unknown {
    background: linear-gradient(135deg, #b09e7e, #8a7860);
    color: var(--fs-paper);
    border-radius: 50%;
    width: 140px; height: 140px;
    align-self: center;
}
.gramps-fs__partner-photo:has(img) { color: var(--fs-paper); background-image: none !important; }

/* Tekst po zewnętrznej stronie awatara */
.gramps-fs__partner-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--fs-ink);
    text-decoration: none;
    min-width: 0;
}
.gramps-fs__partner-info--left { text-align: right; align-items: flex-end; }
.gramps-fs__partner-info--right { text-align: left; align-items: flex-start; }

.gramps-fs__partner-role {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--fs-accent);
}
.gramps-fs__partner-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(18px, 2.05vw, 22px);
    font-weight: 600;
    line-height: 1.15;
    color: var(--fs-ink);
    margin-bottom: 4px;
}
.gramps-fs__partner-info a.gramps-fs__partner-name { color: inherit; text-decoration: none; }
.gramps-fs__partner-info a.gramps-fs__partner-name:hover { color: var(--fs-accent); }
.gramps-fs__partner-meta {
    font-size: 11.5px;
    line-height: 1.42;
    color: var(--fs-ink-soft);
    font-style: italic;
}
.gramps-fs__partner-meta-row {
    display: block;
    margin-bottom: 2px;
}
.gramps-fs__partner-meta strong {
    font-style: normal;
    font-weight: 600;
    color: var(--fs-accent);
    margin-right: 4px;
}

/* Obrączki — środkowa kolumna */
.gramps-fs__rings {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    min-width: 120px;
}
.gramps-fs__rings-img {
    width: 96px; height: 96px;
    background-image: var(--fs-rings-img);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    /* fallback inline SVG jeśli plik nie ładuje */
}
.gramps-fs__rings-img--fallback {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'><g fill='none' stroke='%23b08840' stroke-width='4'><circle cx='42' cy='42' r='28'/><circle cx='78' cy='42' r='28'/></g><g fill='none' stroke='%23d4af6f' stroke-width='2'><circle cx='42' cy='42' r='24'/><circle cx='78' cy='42' r='24'/></g></svg>");
}
.gramps-fs__rings-line {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--fs-accent);
    font-weight: 600;
}
.gramps-fs__rings-marriage {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 13px;
    color: var(--fs-ink-soft);
    text-align: center;
    margin-top: 4px;
}

/* Tablet — kompaktujemy: tekst pod awatarem, ale wciąż obok obrączek */
@media (max-width: 980px) {
    .gramps-fs__hero {
        grid-template-columns: auto auto auto;
        gap: 10px 14px;
        justify-content: center;
    }
    .gramps-fs__partner-info--left,
    .gramps-fs__partner-info--right {
        grid-column: span 1;
        text-align: center;
        align-items: center;
        order: 5;
    }
    .gramps-fs__partner-photo[data-pos="left"]  { grid-column: 1; grid-row: 1; }
    .gramps-fs__rings                           { grid-column: 2; grid-row: 1; }
    .gramps-fs__partner-photo[data-pos="right"] { grid-column: 3; grid-row: 1; }
    .gramps-fs__partner-info[data-pos="left"]   { grid-column: 1; grid-row: 2; }
    .gramps-fs__partner-info[data-pos="right"]  { grid-column: 3; grid-row: 2; }
}

/* Mobile — wszystko stack 1-kolumnowo: imię męża, awatar męża, obrączki, awatar żony, imię żony */
@media (max-width: 640px) {
    .gramps-fs__hero {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .gramps-fs__partner-photo { width: 132px; height: 184px; }
    .gramps-fs__partner-info--left,
    .gramps-fs__partner-info--right {
        grid-column: 1; grid-row: auto !important;
        text-align: center; align-items: center;
    }
    .gramps-fs__partner-photo[data-pos="left"],
    .gramps-fs__partner-photo[data-pos="right"],
    .gramps-fs__rings { grid-column: 1; grid-row: auto; justify-self: center; }
    .gramps-fs__partner-name { font-size: 18px; }
    .gramps-fs__rings-img { width: 86px; height: 86px; }
}

/* Miejsca rodziny — chipy z miejscowościami i zliczonymi wydarzeniami */
.gramps-fs__places {
    min-height: 0;
    overflow: hidden;
    margin: 0 auto;
    padding: 10px 18px;
    max-width: 100%;
    text-align: center;
    border-top: 1px dashed rgba(176, 136, 64, 0.35);
}
.gramps-fs__places-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--fs-accent);
    margin-bottom: 7px;
    font-weight: 600;
}
.gramps-fs__places-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.gramps-fs__place {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 9px;
    border-radius: 999px;
    background: rgba(255, 252, 245, 0.7);
    border: 1px solid rgba(176, 136, 64, 0.35);
    font-size: 11.5px;
    line-height: 1.22;
    color: var(--fs-ink);
    font-family: 'Lora', serif;
    cursor: default;
    max-width: 100%;
}
.gramps-fs__place-name {
    font-weight: 600;
    color: var(--fs-ink);
}
.gramps-fs__place-icon {
    color: var(--fs-accent);
    font-size: 13px;
    line-height: 1;
}
.gramps-fs__place-events {
    color: var(--fs-muted);
    font-style: italic;
    font-size: 10.5px;
}
.gramps-fs__places-empty {
    color: var(--fs-muted);
    font-style: italic;
    font-size: 13px;
}

/* Lista dzieci — linijka tekstowa, niekafelkowo */
.gramps-fs__kids {
    min-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 10px 18px;
    border-top: 1px dashed rgba(176, 136, 64, 0.35);
    border-bottom: 1px dashed rgba(176, 136, 64, 0.35);
    text-align: center;
}
.gramps-fs__kids-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--fs-accent);
    margin-bottom: 6px;
    font-weight: 600;
}
.gramps-fs__kids-line {
    font-family: 'Lora', serif;
    font-size: clamp(12px, 1.22vw, 14px);
    line-height: 1.52;
    color: var(--fs-ink);
    max-height: calc(100% - 24px);
    overflow: hidden;
}
.gramps-fs__kids-line a {
    color: var(--fs-ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.gramps-fs__kids-line a:hover {
    color: var(--fs-accent);
    border-bottom-color: var(--fs-accent);
}
.gramps-fs__kids-num {
    display: inline-block;
    width: 18px; height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background: var(--fs-accent);
    color: var(--fs-paper);
    font-size: 11px;
    font-weight: 700;
    font-family: 'Lora', serif;
    margin-right: 4px;
    vertical-align: 1px;
}
.gramps-fs__kids-line a.has-family {
    color: var(--fs-accent);
    font-weight: 600;
}
.gramps-fs__kids-sep { color: var(--fs-paper-edge); padding: 0 6px; }
.gramps-fs__kids-empty { color: var(--fs-muted); font-style: italic; font-size: 13px; }

/* 3 klikalne kafle — Galeria, Notatki, Mapka */
.gramps-fs__actions {
    align-self: end;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 0;
    min-height: 0;
}
.gramps-fs__action {
    border: 1px solid rgba(176, 136, 64, 0.35);
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.7), rgba(239, 229, 210, 0.85));
    border-radius: 10px;
    min-height: 74px;
    padding: 10px 10px 9px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    color: var(--fs-ink);
    font-family: 'Lora', serif;
}
.gramps-fs__action:hover {
    transform: translateY(-2px);
    border-color: var(--fs-accent);
    box-shadow: 0 8px 20px rgba(138, 75, 42, 0.16);
}
.gramps-fs__action--disabled {
    opacity: 0.5; cursor: default;
    pointer-events: none;
}
.gramps-fs__action-icon {
    font-size: 18px;
    color: var(--fs-accent);
    margin-bottom: 3px;
    line-height: 1;
}
.gramps-fs__action-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--fs-ink);
}
.gramps-fs__action-meta {
    font-size: 10.5px;
    font-style: italic;
    color: var(--fs-muted);
    margin-top: 2px;
}
.gramps-fs__card.is-fit-tight .gramps-fs__partner-meta {
    font-size: 10.5px;
    line-height: 1.32;
}
.gramps-fs__card.is-fit-tight .gramps-fs__places,
.gramps-fs__card.is-fit-tight .gramps-fs__kids {
    padding-top: 8px;
    padding-bottom: 8px;
}
.gramps-fs__card.is-fit-tight .gramps-fs__place {
    font-size: 10.5px;
    padding: 3px 8px;
}
.gramps-fs__card.is-fit-tight .gramps-fs__kids-line {
    font-size: 12px;
    line-height: 1.38;
}
.gramps-fs__card.is-fit-dense .gramps-fs__partner-photo,
.gramps-fs__card.is-fit-dense .gramps-fs__partner-photo--framed {
    width: 132px;
    height: 194px;
}
.gramps-fs__card.is-fit-dense .gramps-fs__rings-img {
    width: 84px;
    height: 84px;
}
.gramps-fs__card.is-fit-dense .gramps-fs__partner-name {
    font-size: 18px;
}
.gramps-fs__card.is-fit-dense .gramps-fs__places-title,
.gramps-fs__card.is-fit-dense .gramps-fs__kids-title {
    font-size: 10.5px;
    margin-bottom: 5px;
}
.gramps-fs__card.is-fit-dense .gramps-fs__place-events {
    display: none;
}
@media (max-width: 540px) {
    .gramps-fs__card { height: auto; min-height: var(--fs-card-height); }
    .gramps-fs__card-inner { display: flex; flex-direction: column; }
    .gramps-fs__actions { grid-template-columns: 1fr; }
}

/* Pasek dzieci-rodzin */
.gramps-fs__bar--children-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 16px 6px;
    max-width: 920px;
    margin: 4px auto 0;
}
.gramps-fs__bar--children-list::-webkit-scrollbar { height: 6px; }
.gramps-fs__bar--children-list::-webkit-scrollbar-thumb { background: rgba(60, 40, 20, 0.2); border-radius: 3px; }
.gramps-fs__bar--children-list .gramps-fs__chip {
    min-width: 0;
    flex: 1 1 0;
    scroll-snap-align: start;
}

.gramps-fs__pagination {
    text-align: center;
    margin-top: 8px;
    color: var(--fs-muted);
    font-size: 12px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    letter-spacing: 0.12em;
}
.gramps-fs__pagination strong { color: var(--fs-ink); font-style: normal; }

/* ====================== Lekki modal (Notatki, Mapa) ====================== */
.gramps-fs-modal {
    position: fixed; inset: 0;
    z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.gramps-fs-modal.is-open { opacity: 1; }

.gramps-fs-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(60, 40, 20, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
}

.gramps-fs-modal__dialog {
    position: relative;
    width: min(820px, 96vw);
    max-height: min(92vh, 1060px);
    display: flex;
    flex-direction: column;
    background: #faf6ee;
    border-radius: 14px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.22s ease;
    background:
        linear-gradient(#faf6ee, #faf6ee) padding-box,
        linear-gradient(135deg, #d9c4a0, #b08840 50%, #d9c4a0) border-box;
    border: 1.5px double rgba(176, 136, 64, 0.55);
}
.gramps-fs-modal.is-open .gramps-fs-modal__dialog {
    transform: translateY(0) scale(1);
}

.gramps-fs-modal__head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px 14px;
    border-bottom: 1px dashed rgba(176, 136, 64, 0.35);
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.95), rgba(245, 234, 210, 0.7));
}
.gramps-fs-modal__kicker {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #8a4b2a;
    font-weight: 600;
    margin-bottom: 4px;
}
.gramps-fs-modal__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: #3b2f23;
    line-height: 1.2;
    margin: 0;
}
.gramps-fs-modal__close {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border: 1px solid rgba(60, 40, 20, 0.2);
    background: #fff;
    border-radius: 999px;
    color: #6b5a45;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.gramps-fs-modal__close:hover { background: #8a4b2a; color: #fff; }

.gramps-fs-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 22px 22px;
    color: #3b2f23;
    font-family: 'Lora', Georgia, serif;
}
.gramps-fs-modal__meta {
    font-size: 12px;
    color: #8a7860;
    font-style: italic;
    margin: 0 0 14px;
    letter-spacing: 0.04em;
}

.gramps-fs-modal__foot {
    flex: 0 0 auto;
    padding: 12px 22px;
    border-top: 1px dashed rgba(176, 136, 64, 0.35);
    background: rgba(245, 234, 210, 0.55);
    font-size: 12px;
    color: #6b5a45;
}

@media (max-width: 540px) {
    .gramps-fs-modal__title { font-size: 18px; }
    .gramps-fs-modal__head { padding: 14px 16px 10px; }
    .gramps-fs-modal__body { padding: 14px 16px 18px; }
}

/* ====================== Notatki w modalu ====================== */
.gramps-fs-notes {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.gramps-fs-note {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 14px 16px;
    background: #fffdf6;
    border: 1px solid rgba(176, 136, 64, 0.25);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(60, 40, 20, 0.05);
}
.gramps-fs-note__num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #8a4b2a;
    color: #faf6ee;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.gramps-fs-note__body {
    color: #3b2f23;
    font-size: 14px;
    line-height: 1.65;
}
.gramps-fs-note__body p {
    margin: 0 0 8px;
}
.gramps-fs-note__body p:last-child { margin-bottom: 0; }

/* ====================== Mapa miejsc w modalu ====================== */
.gramps-fs-modal__body--map {
    padding: 0;
    display: flex;
    flex-direction: column;
}
.gramps-fs-modal__body--map .gramps-fs-modal__meta {
    margin: 0;
    padding: 12px 22px;
    border-bottom: 1px dashed rgba(176, 136, 64, 0.3);
}
.gramps-fs-map {
    flex: 1 1 auto;
    width: 100%;
    height: 72vh;
    min-height: 380px;
    background: #e6efe9;
}
@media (max-width: 540px) {
    .gramps-fs-map { height: 70vh; min-height: 320px; }
}

/* Markery custom — kolorowe kropki z ikoną */
.gramps-fs-marker-wrap { background: transparent; border: 0; }
.gramps-fs-marker {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    border: 2px solid #fff;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.gramps-fs-marker__icon {
    transform: rotate(45deg);
    line-height: 1;
}
.gramps-fs-marker__count {
    position: absolute;
    top: -6px; right: -8px;
    transform: rotate(45deg);
    background: #fff;
    color: #3b2f23;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Lora', serif;
    min-width: 14px;
    text-align: center;
}

/* Popup Leaflet — stylistyka pocztówki */
.leaflet-popup-content-wrapper {
    background: #faf6ee;
    border-radius: 10px;
    border: 1px solid rgba(176, 136, 64, 0.4);
    box-shadow: 0 12px 30px rgba(60, 40, 20, 0.25);
}
.leaflet-popup-tip { background: #faf6ee; border: 1px solid rgba(176, 136, 64, 0.4); }
.leaflet-popup-content {
    margin: 12px 14px;
    font-family: 'Lora', Georgia, serif;
    color: #3b2f23;
}
.gramps-fs-popup__title {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    color: #8a4b2a;
    margin-bottom: 6px;
    line-height: 1.25;
}
.gramps-fs-popup__row {
    display: grid;
    grid-template-columns: 18px auto 1fr;
    gap: 4px 8px;
    font-size: 12px;
    line-height: 1.5;
    padding: 2px 0;
}
.gramps-fs-popup__icon { font-size: 13px; line-height: 1.4; }
.gramps-fs-popup__label {
    font-weight: 600;
    color: #6b5a45;
    text-transform: lowercase;
}
.gramps-fs-popup__items { color: #3b2f23; }
.gramps-fs-popup__items em {
    color: #8a7860;
    font-style: italic;
    font-size: 11px;
}

/* ====================== GLightbox — opis pod zdjęciem ====================== */
.glightbox-clean .gdesc-inner {
    font-family: 'Lora', Georgia, serif;
    color: #f5e6c8;
}
.glightbox-clean .gslide-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    color: #fff;
    margin-bottom: 6px;
}
.glightbox-clean .gslide-desc {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 252, 245, 0.85);
}
.glightbox-clean .gslide-desc strong {
    color: #fff;
}
.glightbox-clean .gslide-desc em {
    color: rgba(245, 234, 210, 0.78);
    font-style: italic;
}
.gramps-fs__caption-link {
    display: inline-block;
    margin-top: 6px;
    color: #ffd9a8;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 217, 168, 0.4);
}
.gramps-fs__caption-link:hover {
    color: #ffe8c8;
    border-bottom-style: solid;
}
.gramps-fs__caption-title {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 252, 245, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ====================== Coverflow — sąsiednie slajdy mniejsze ====================== */
.gramps-fs__swiper.swiper {
    /* Swiper effect-coverflow już dostarcza scale, my poprawiamy odstęp */
    padding: 30px 0 8px;
}
.gramps-fs__swiper .swiper-slide {
    transition: transform 0.4s ease, filter 0.4s ease;
    width: 92vw;
    max-width: 920px;
}
.gramps-fs__swiper .swiper-slide:not(.swiper-slide-active) {
    filter: brightness(0.92) saturate(0.85);
}

@media (min-width: 768px) {
    .gramps-fs__swiper .swiper-slide { width: 80%; max-width: 920px; }
}
