/* ============================================================
   Person / Grave Record Page
   ============================================================ */

/* ── Back nav ── */
.person-nav {
    background: #0d0d0d;
    border-bottom: 1px solid #1e1e1e;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 30px;
}
.back-pill {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    color: #777;
    font-size: 13px;
    padding: 5px 14px;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.back-pill:hover { border-color: #FFD700; color: #FFD700; }

/* ── Hero ── */
.person-hero {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    border-bottom: 1px solid #2a2a2a;
    padding: 70px 30px 55px;
    text-align: center;
}
.person-hero h1 {
    color: #FFD700;
    font-family: Georgia, serif;
    font-size: 54px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 14px;
}
.person-years {
    color: #888;
    font-size: 20px;
    margin: 0;
}
.person-years .year-sep { margin: 0 10px; color: #444; }

/* Hero dates + age */
.person-hero-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    color: #888;
    font-size: 18px;
    margin: 0 0 12px;
}
.hero-age {
    background: #1e1e1e;
    border: 1px solid #333;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Veteran hero badge */
.vet-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.3);
    color: #FFD700;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 7px 18px;
    border-radius: 24px;
    margin-top: 4px;
}

/* ── Body ── */
.person-body {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    align-items: start;
}

/* ── Left column ── */
.person-left { padding-right: 40px; }

.grave-photo-wrap {
    margin-bottom: 30px;
    cursor: zoom-in;
}
.grave-photo-wrap img {
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    display: block;
    max-width: 100%;
    transition: border-color 0.2s;
}
.grave-photo-wrap img:hover { border-color: #FFD700; }
.photo-caption {
    color: #555;
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
}

.extra-photos-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.ep-thumb {
    cursor: zoom-in;
    flex: 0 0 calc(33.333% - 6px);
    max-width: calc(33.333% - 6px);
}
.ep-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
    display: block;
    transition: border-color 0.2s;
}
.ep-thumb:hover img { border-color: #FFD700; }
.ep-caption { color: #555; font-size: 11px; margin-top: 4px; text-align: center; }

.person-section {
    margin-bottom: 30px;
}
.person-section h3 {
    color: #FFD700;
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: normal;
    margin: 0 0 12px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.inscription-text {
    background: #111;
    border-left: 3px solid #2a2a2a;
    color: #ccc;
    font-family: Georgia, serif;
    font-size: 16px;
    font-style: italic;
    line-height: 1.8;
    margin: 0;
    padding: 16px 20px;
    white-space: pre-wrap;
}
.insc-side-label {
    color: #555;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 12px 0 4px;
}
.insc-side-label:first-child { margin-top: 0; }
.notes-text {
    color: #bbb;
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
}

/* Obituary — slightly tighter than notes since it can be long.
   Left-bordered gold accent gives it a "memorial" feel. */
.obit-text {
    color: #cfcfcf;
    font: 15px/1.7 Georgia, serif;
    padding: 4px 0 4px 18px;
    border-left: 2px solid rgba(255,215,0,0.35);
    white-space: pre-line;
}

/* Local Businesses — links to organization articles, one per row */
.org-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.org-link-list li {
    padding: 10px 14px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-bottom: 8px;
    background: rgba(255,215,0,0.02);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.org-link-list li:hover { border-color: rgba(255,215,0,0.4); }
.org-link-name {
    color: #FFD700;
    text-decoration: none;
    font: 15px/1.3 Georgia, serif;
    font-weight: 600;
}
a.org-link-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.org-link-role {
    color: #888;
    font: 11px/1 Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.25);
    padding: 4px 8px;
    border-radius: 4px;
}

/* ── Details grid ── */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.detail-item { }
.detail-label {
    color: #555;
    display: block;
    font-size: 11px;
    letter-spacing: 0.07em;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.detail-value {
    color: #d0d0d0;
    font-family: Georgia, serif;
    font-size: 16px;
}
.detail-value.full-row { grid-column: 1 / -1; }
.details-note {
    color: #444;
    font-size: 12px;
    font-style: italic;
    margin: 8px 0 0;
}

/* ── Right column ── */
.person-right { position: relative; }

/* Fix Leaflet tile seam lines */
.leaflet-tile { outline: 1px solid transparent; }

#personMap {
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    height: 260px;
    margin-bottom: 20px;
    overflow: hidden;
    width: 100%;
}

.cemetery-card {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 18px 20px;
}
.cemetery-card h4 {
    color: #FFD700;
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: normal;
    margin: 0 0 6px;
}
.cemetery-card .card-town {
    color: #666;
    font-size: 13px;
    margin-bottom: 14px;
}
.card-links { display: flex; gap: 8px; flex-wrap: wrap; }
.cemetery-card .card-link {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 6px 14px;
    display: inline-block;
    transition: border-color 0.2s, color 0.2s;
}
.cemetery-card .card-link:hover { border-color: #FFD700; color: #FFD700; }
.card-link-map { border-color: #2a4a2a !important; color: #4fc3f7 !important; }
.card-link-map:hover { border-color: #4fc3f7 !important; }

.spouse-card {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 18px 20px;
}
.spouse-card h4 {
    color: #aaa;
    font-family: Georgia, serif;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.spouse-card { display: flex; gap: 16px; align-items: flex-start; }
.spouse-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid #2a2a2a; flex-shrink: 0; }
.spouse-info { flex: 1; min-width: 0; }
.spouse-name { font-family: Georgia, serif; font-size: 18px; margin-bottom: 3px; }
.spouse-name a { color: #e8e8e8; text-decoration: none; }
.spouse-name a:hover { color: #FFD700; }
.spouse-dates { color: #666; font-size: 13px; margin-bottom: 6px; }
.spouse-cem { color: #888; font-size: 13px; margin-bottom: 10px; }
.spouse-links { display: flex; gap: 8px; flex-wrap: wrap; }
.spouse-btn {
    color: #888;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 5px 12px;
    display: inline-block;
    transition: border-color 0.2s, color 0.2s;
}
.spouse-btn:hover { border-color: #FFD700; color: #FFD700; }
.spouse-years { color: #666; font-size: 13px; }

.no-gps-note {
    color: #444;
    font-size: 12px;
    text-align: center;
    margin-top: -12px;
    margin-bottom: 20px;
}

/* ── Pan/zoom image viewer lightbox ── */
.lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #080808;
    z-index: 1000;
    flex-direction: column;
}
.lb-overlay.open { display: flex; }

.lb-toolbar {
    align-items: center;
    background: #111;
    border-bottom: 1px solid #1e1e1e;
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    justify-content: space-between;
    padding: 10px 16px;
}
.lb-title {
    color: #FFD700;
    font-family: Georgia, serif;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-controls { display: flex; gap: 6px; flex-shrink: 0; }
.lb-btn {
    background: #1a1a1a;
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: 6px;
    color: #FFD700;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 6px 12px;
    transition: border-color 0.15s, background 0.15s;
}
.lb-btn:hover { border-color: #FFD700; background: rgba(255,215,0,0.15); }
.lb-close-btn { margin-left: 6px; }
.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px; height: 48px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,215,0,0.4);
    color: #FFD700;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.lb-arrow:hover { background: #FFD700; color: #1a1a1a; }
.lb-arrow.prev { left: 18px; }
.lb-arrow.next { right: 18px; }
.lb-tb-counter {
    color: #888;
    font-family: Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    margin-left: 10px;
}

#lbViewer {
    cursor: grab;
    flex: 1;
    overflow: hidden;
    position: relative;
}
#lbContainer {
    left: 0;
    position: absolute;
    top: 0;
    transform-origin: 0 0;
}
#lbImg {
    display: block;
    max-width: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.lb-hint {
    background: #111;
    border-top: 1px solid #1e1e1e;
    color: #FFD700;
    flex-shrink: 0;
    font-size: 12px;
    margin: 0;
    padding: 6px;
    text-align: center;
}

/* ── Leaflet popup dark theme ── */
.leaflet-popup-content-wrapper {
    background: #1a1a1a !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.7) !important;
    color: #e0e0e0 !important;
    padding: 10px 14px !important;
}
.leaflet-popup-tip { background: #1a1a1a !important; }
.leaflet-popup-content-wrapper a { color: #FFD700 !important; }
.leaflet-popup-close-button { color: #555 !important; }
.leaflet-popup-close-button:hover { color: #fff !important; }
.leaflet-popup-content { margin: 0 !important; color: #e0e0e0 !important; }

/* ── GPS coordinates (inside cemetery card) ── */
.coords-row { min-width: 0; }
.coords-label { color: #444; display: block; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 2px; }
.coords-val { color: #555; font-size: 12px; font-family: monospace; }

/* ── Mobile ── */
@media (max-width: 750px) {
    .person-hero h1 { font-size: 34px; }
    .person-years { font-size: 16px; }
    .person-body {
        grid-template-columns: 1fr;
        padding: 24px 16px 60px;
    }
    .person-left { padding-right: 0; margin-bottom: 30px; }
    .person-right { position: static; }
    .breadcrumb { padding: 10px 16px; }
}
