﻿/* === Global Colours & Layout === */
:root {
    --bg: #f7f3eb;
    --card: #fffdf8;
    --ink: #3a2f24;
    --muted: #6c6258;
    --line: #d8ccba;
    --accent: #7c5c3d;
    --accent-dark: #5f4630;
    --accent-soft: #efe4d4;
    --shadow: 0 6px 18px rgba(0,0,0,0.08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}

a {
    color: #8c3f1f;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav);
    border-bottom: 1px solid var(--line);
    padding-top: 60px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between; /* logo left, form right */
    gap: 1rem;
    padding: 0.5rem 0;
}

/* Row 2: navigation + hamburger */
.header-bottom {
    background: #d7ded0; /* lighter shade than var(--nav) */
    border-top: 1px solid var(--line);
    padding: 0.5rem 0;
}


.page-wrap {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

.hero {
    background: linear-gradient(135deg, #faf6f0 0%, #f0e6d8 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

    .hero h1 {
        margin: 0 0 10px;
        font-size: clamp(1.8rem, 2.5vw, 2.7rem);
        color: var(--accent-dark);
    }

    .hero p {
        margin: 0;
        color: var(--muted);
        max-width: 950px;
    }

.map-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

    .panel h2,
    .panel h3 {
        margin-top: 0;
        color: var(--accent-dark);
    }

.filter-group {
    margin-bottom: 12px;
}

    .filter-group label {
        display: block;
        font-weight: bold;
        font-size: 0.95rem;
        margin-bottom: 5px;
        color: var(--accent-dark);
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #ccbda8;
        border-radius: 10px;
        font: inherit;
        background: #fff;
        color: var(--ink);
    }

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

button {
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
}

    button:hover {
        background: var(--accent-dark);
    }

    button.secondary {
        background: #8d826f;
    }

        button.secondary:hover {
            background: #756b5b;
        }

.map-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.map-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.results-summary {
    font-size: 0.96rem;
    color: var(--muted);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 0.9rem;
    color: var(--muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

#map {
    width: 100%;
    height: 760px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #e7ebee;
}

.results-list {
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.result-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    margin-bottom: 12px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: pointer;
}

    .result-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    }

.result-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-dark);
    margin-bottom: 6px;
}

.result-meta {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 3px;
}

.result-link {
    display: inline-block;
    margin-top: 6px;
    font-weight: bold;
}

.empty-state {
    color: var(--muted);
    font-style: italic;
}

.leaflet-popup-content {
    margin: 14px 14px 12px;
    min-width: 230px;
    max-width: 290px;
    font-family: Georgia, "Times New Roman", serif;
}

.popup-title {
    font-size: 1.08rem;
    font-weight: bold;
    color: var(--accent-dark);
    margin-bottom: 6px;
}

.popup-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 8px 0 10px;
    display: block;
}

.popup-meta {
    font-size: 0.92rem;
    margin-bottom: 4px;
    color: #4b433b;
}

.popup-desc {
    margin-top: 8px;
    font-size: 0.94rem;
    color: #3f3831;
}

.popup-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(124, 92, 61, 0.2);
}

    .marker-cluster-small div,
    .marker-cluster-medium div,
    .marker-cluster-large div {
        background: rgba(124, 92, 61, 0.75);
        color: #fff;
        font-weight: bold;
    }

@media (max-width: 1100px) {
    .map-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .results-list {
        max-height: 320px;
    }

    #map {
        height: 620px;
    }
}

@media (max-width: 700px) {
    .page-wrap {
        padding: 12px;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    #map {
        height: 520px;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #a4b39d !important;
    }
    /* Edward Biddulph page-inspired colour update */
    body {
        color: #3f463d;
        background-color: #ffffff;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #a4b39d !important;
    }

    a {
        color: #6f8568;
    }

        a:hover {
            color: #8f9f88;
        }

    strong {
        color: #5f6f59;
    }
    /* Ship links inside search results */
    .ship-link a {
        color: #68815C;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid rgba(104,129,92,0.35);
    }

        .ship-link a:hover {
            color: #4f6d44;
            border-bottom-color: #4f6d44;
        }
    .convict-result a {
        color: #68815C;
        text-decoration: none;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 4px;
        background: rgba(144,167,132,0.15);
        transition: all 0.2s ease;
    }

        .convict-result a:hover {
            background: #90a784;
            color: #fff;
        }
    /* Ship summary area */
    .convict-ship-summary {
        margin-top: 0.35rem;
    }

        .convict-ship-summary p {
            margin: 0 0 0.45rem 0;
        }

    .ship-year {
        color: #6b7280;
    }

    /* Ship link + preview */
    .ship-link-wrap {
        position: relative;
        display: inline-block;
    }

    .ship-link {
        color: #68815C;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid rgba(104,129,92,0.35);
        transition: color 0.2s ease, border-color 0.2s ease;
    }

        .ship-link:hover {
            color: #4f6d44;
            border-bottom-color: #4f6d44;
        }

    .ship-preview {
        position: absolute;
        left: 0;
        top: calc(100% + 8px);
        min-width: 190px;
        max-width: 240px;
        padding: 0.65rem 0.8rem;
        background: #fffdf8;
        color: #3c3c3c;
        border: 1px solid #d8ccba;
        border-radius: 8px;
        box-shadow: 0 10px 22px rgba(0,0,0,0.08);
        font-size: 0.92rem;
        line-height: 1.4;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
        z-index: 30;
        pointer-events: none;
        white-space: normal;
    }

    .ship-link-wrap:hover .ship-preview,
    .ship-link-wrap:focus-within .ship-preview {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Button */
    .view-ship-btn {
        display: inline-block;
        padding: 0.42rem 0.8rem;
        background: #90a784;
        color: #fff;
        text-decoration: none;
        border-radius: 999px;
        font-size: 0.92rem;
        font-weight: 600;
        transition: background 0.2s ease, transform 0.2s ease;
    }

        .view-ship-btn:hover {
            background: #68815C;
            transform: translateY(-1px);
        }

    .ship-button-inline {
        margin-top: 0.45rem;
    }

    /* Mobile adjustment */
    @media (max-width: 640px) {
        .ship-preview {
            left: 0;
            right: auto;
            min-width: 170px;
            max-width: 220px;
        }

        .view-ship-btn {
            font-size: 0.88rem;
            padding: 0.4rem 0.72rem;
        }
    }
}



    