:root {
    --bg: #f6f7f3;
    --surface: #ffffff;
    --ink: #1e2722;
    --muted: #5d685f;
    --line: #d9dfd6;
    --primary: #1f6f4a;
    --primary-dark: #155236;
    --strava: #f7aa02;
    --strava-dark: #d99b3d;
    --accent: #c7433d;
    --gold: #d99b3d;
    --shadow: 0 18px 45px rgba(22, 34, 26, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(246, 247, 243, 0.93);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 1.32rem;
    line-height: 1;
    letter-spacing: 0;
}

    .brand-mark svg {
        display: block;
        width: 30px;
        height: 30px;
    }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

    .site-nav a {
        text-decoration: none;
    }

        .site-nav a:hover {
            color: var(--primary);
        }

.hero {
    position: relative;
    min-height: min(720px, calc(100vh - 68px));
    display: grid;
    align-items: end;
    overflow: hidden;
    color: #fff;
}

.hero-media {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 34, 24, 0.83), rgba(15, 34, 24, 0.35) 48%, rgba(15, 34, 24, 0.65)), url("../assets/images/hero.png") center / cover;
    transform: scale(1.01);
}

.hero-route-outline {
    position: absolute;
    left: clamp(16px, 7vw, 96px);
    bottom: clamp(54px, 9vh, 96px);
    z-index: 1;
    width: min(42vw, 520px);
    min-width: 300px;
    opacity: 0.9;
    filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.42));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(620px, calc(50% - 54px));
    padding: 90px 0 72px;
    margin-left: 50%;
    margin-right: clamp(18px, 4vw, 54px);
}

.hero-icons {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-icons img {
    height: 128px;
    width: auto;
    object-fit: contain;
}


.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 1.0rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero-copy {
    max-width: 640px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
}

    .button.primary {
        color: #fff;
        background: var(--primary);
    }

        .button.primary:hover {
            background: var(--primary-dark);
        }

    .button.strava {
        color: #fff;
        background: var(--strava);
    }

        .button.strava:hover {
            background: var(--strava-dark);
        }

    .button.secondary {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.62);
        background: rgba(255, 255, 255, 0.08);
    }

.stats {
    display: flex;
    flex-wrap: nowrap;
    gap: 0; /* separators handled with borders to ensure consistent dividers */
    width: min(1120px, calc(100% - 36px));
    margin: -34px auto 0;
    position: relative;
    z-index: 4;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
    box-shadow: var(--shadow);
}

    .stats article {
        flex: 1;
        min-width: 200px;
        min-height: 98px;
        padding: 18px;
        background: var(--surface);
    }

        /* add a vertical divider between adjacent stat items */
        .stats article + article {
            border-left: 1px solid var(--line);
        }

    .stats span {
        display: block;
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .stats strong {
        display: block;
        margin-top: 8px;
        font-size: clamp(1.2rem, 2vw, 1.65rem);
    }

.section {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 84px 0 0;
}

    /* ensure the last section (completions) doesn't leave extra empty space before the footer */
    .section:last-of-type {
        padding-bottom: 0;
        margin-bottom: 0;
    }

/* make footer sit directly after content */
.site-footer {
    margin-top: 0;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 48px;
    align-items: start;
}

.btn-link {
    display: inline-block;
    margin-left: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

    .btn-link:hover {
        background: linear-gradient(135deg, #66bb6a, #388e3c);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .btn-link:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }

h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

p {
    color: var(--muted);
}

.notice {
    padding: 24px;
    border-left: 5px solid var(--accent);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(22, 34, 26, 0.08);
}

    .notice ul {
        padding-left: 20px;
        margin-bottom: 0;
        color: var(--muted);
    }

.section-heading {
    max-width: 760px;
    margin-bottom: 26px;
}

.map-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

#map {
    width: 100%;
    height: min(68vh, 620px);
    min-height: 420px;
}

.map-status {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 500;
    max-width: calc(100% - 28px);
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    font-size: 0.9rem;
    box-shadow: 0 8px 22px rgba(22, 34, 26, 0.12);
}

#elevation-div {
    width: 100%;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #cbf7c6;
    box-shadow: var(--shadow);
}

/* hide label */
.elevation-position-marker .elevation-label {
    display: none !important;
}


#elevation-div a {
    display: none !important;
}



.elev-dot {
    width: 10px;
    height: 10px;
    background: #ff5722;
    border-radius: 20%;
    border: 2px solid white;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
    position: relative;
}


/* Elevation legend (Altitude text hide)*/
#elevation-div .legend {
    display: none !important;
}


/* Larger touch surface on mobile */
.leaflet-marker-icon {
    cursor: pointer;
}
/* ✅ Legend box */
.map-legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    font-size: 13px;
    line-height: 1.4;
}
    /* Title */
    .map-legend .legend-title {
        font-weight: 700;
        margin-bottom: 6px;
    }
    /* row */
    .map-legend .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 4px 0;
    }
    /* icon */
    .map-legend img {
        width: 20px;
        height: 20px;
    }
/* ✅ WRAPPER */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
/* ✅ TABLE */
.tour-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
    /* HEADER */
    .tour-table thead {
        background: var(--line);
    }

    .tour-table th {
        text-align: left;
        padding: 12px 14px;
        font-weight: 700;
        white-space: nowrap;
    }
    /* BODY */
    .tour-table td {
        padding: 12px 14px;
        border-top: 1px solid var(--line);
    }
    /* ROW hover */
    .tour-table tbody tr:hover {
        background: rgba(0,0,0,0.04);
    }
    /* last row */
    .tour-table tbody tr:last-child td {
        border-bottom: 0;
    }


.download-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 36px;
    margin-top: 84px;
    border-radius: 8px;
    background: #e8f0e8;
}

    .download-band p {
        max-width: 690px;
        margin-bottom: 0;
    }

.story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.story-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

    .story-card h3,
    .story-card p {
        padding: 0 18px;
    }

    .story-card h3 {
        padding-top: 18px;
    }

    .story-card p {
        padding-bottom: 18px;
    }

.photo-placeholder {
    display: grid;
    min-height: 190px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, rgba(31, 111, 74, 0.88), rgba(199, 67, 61, 0.76)), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 12px, transparent 12px 24px);
    font-weight: 800;
}

.story-card a {
    display: block;
}

    .story-card a:hover img {
        transform: scale(1.05);
    }

.story-image {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}


.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

    .table-toolbar label {
        font-weight: 800;
    }

    .table-toolbar input {
        width: min(360px, 100%);
        min-height: 42px;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 6px;
        font: inherit;
    }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.empty-row {
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #222;
    color: #fff;
    font-size: 0.9rem;
    border-top: 2px solid #FFC107;
}

.footer-left {
    flex: 1;
}

.footer-center {
    flex: 1;
    flex-direction: column;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.footer-icons {
    display: flex;
    align-items: center;
}

    /* icons */

    .footer-icons a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 10px;
        background: #444;
        color: white;
        border-radius: 50%;
        font-size: 16px;
        text-decoration: none;
        transition: all 0.25s ease;
    }


        /* hover */
        .footer-icons a:hover {
            background: #FFC107;
            color: #000;
            transform: translateY(-2px) scale(1.1);
        }


        .footer-icons a:nth-child(1):hover {
            background: #1877f2; /* Facebook */
            color: white;
        }

        .footer-icons a:nth-child(2):hover {
            background: #e53935; /* Email */
            color: white;
        }

        .footer-icons a:nth-child(3):hover {
            background: #4caf50; /* Phone */
            color: white;
        }


/* Phone */
@media (max-width: 600px) {
    .site-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-icons a {
        margin: 0 10px;
    }
}

@media (max-width: 820px) {
    .hero-route-outline {
        left: 50%;
        bottom: 210px;
        width: min(78vw, 430px);
        min-width: 0;
        opacity: 0.68;
        transform: translateX(-50%);
    }

    .hero-content {
        width: min(880px, calc(100% - 36px));
        margin: 0 auto;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .stats,
    .story-grid {
        grid-template-columns: 1fr 1fr;
    }

    .two-column,
    .download-band {
        display: block;
    }

        .download-band .button {
            margin-top: 18px;
            width: 100%;
        }

    .map-legend {
        font-size: 12px;
        padding: 8px 10px;
    }

        .map-legend img {
            width: 18px;
            height: 18px;
        }


    .tour-table {
        font-size: 0.85rem;
    }

        .tour-table th,
        .tour-table td {
            padding: 10px 12px;
        }
}

@media (max-width: 560px) {
    .hero {
        min-height: 660px;
    }

    .hero-route-outline {
        bottom: 340px;
        width: min(82vw, 320px);
    }

    .hero-content {
        padding-bottom: 58px;
    }

    .stats,
    .story-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        flex-direction: column;
    }

    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    #elevation-div {
        height: 120px;
    }

    #map {
        min-height: 360px;
    }
}
