/* Road to Hana stop pages: attractiondetails.aspx when the POI has an entry in
   App_Data/road-to-hana-stops.json. Markup comes from App_Code/BLL/RoadToHanaStops.cs; the video
   and the photo viewer are hg-stop.js. Same look as the Road to Hana guide (hg-guide.css) and the
   landing pages, but self-contained: only the --hgx tokens from hg-site.css are assumed. */

.hgs-band {
    margin: 0 -15px;
    padding: 18px 15px 4px 15px;
    background: #f7f1e6;
}

.hgs-band-bottom {
    padding-top: 4px;
    padding-bottom: 34px;
}

.hgs, .hgs-nav, .hgs-stay {
    max-width: 1010px; /* the width of the map card below it */
    margin-left: auto;
    margin-right: auto;
    font-family: var(--hgx-sans);
    color: var(--hgx-ink);
}

/* ---------- the card ---------- */

.hgs {
    --hgs-pad: 44px;
    background: var(--hgx-cream);
    border: 1px solid rgba(168,154,133,0.45);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(60,50,30,0.06), 0 10px 24px -14px rgba(60,50,30,0.35);
    overflow: hidden;
}

    .hgs > * {
        margin-left: var(--hgs-pad);
        margin-right: var(--hgs-pad);
    }

    .hgs > .hgs-hero {
        margin-left: 0;
        margin-right: 0;
    }

.hgs-crumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    font-size: 14px;
    color: var(--hgx-muted);
}

    .hgs-crumb a {
        font-weight: 600;
    }

.hgs-head {
    margin-top: 14px;
    margin-bottom: 20px;
}

.hgs-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    font-size: 14px;
    color: var(--hgx-muted);
}

.hgs-mile {
    color: var(--hgx-gold-text);
    font-weight: 600;
}

.hgs-badge {
    padding: 2px 11px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.hgs-badge-rec {
    color: #3f6a2a;
    background: #edf3e5;
    border-color: rgba(84,127,55,0.35);
}

.hgs-badge-note {
    color: var(--hgx-gold-text);
    background: #f7f0d8;
    border-color: rgba(168,135,77,0.4);
}

.hgs-badge-skip, .hgs-badge-private {
    color: #6b6352;
    background: #efeae0;
    border-color: rgba(107,99,82,0.3);
}

.hgs-badge-danger {
    color: var(--hgx-red);
    background: #f8e9e6;
    border-color: rgba(136,36,39,0.35);
}

.hgs-h1 {
    margin: 8px 0 0 0;
    font-family: var(--hgx-serif);
    font-weight: 400;
    font-size: 46px;
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--hgx-ink);
}

.hgs-aka {
    font-style: italic;
    font-weight: 300;
    font-size: 0.6em;
    color: var(--hgx-muted);
    white-space: nowrap;
}

/* ---------- hero: video or photo, edge to edge ---------- */

.hgs-hero {
    position: relative;
    background: #1c1815;
}

    .hgs-hero img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 560px;
        object-fit: cover;
    }

.hgs-video {
    aspect-ratio: 16 / 9;
}

    .hgs-video video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
    }

.hgs-play {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    line-height: 0;
    cursor: pointer;
}

    .hgs-play:hover, .hgs-play:focus {
        background: rgba(0,0,0,0.85);
    }

    .hgs-play svg {
        width: 20px;
        height: 20px;
    }

    .hgs-play[hidden] {
        display: none;
    }

/* ---------- text column, with the facts in a rail ---------- */

.hgs-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    column-gap: 44px;
    margin-top: 30px;
}

    .hgs-main > * {
        grid-column: 1;
    }

.hgs-alert {
    margin: 0 0 20px 0;
    padding: 12px 16px;
    background: #f8e9e6;
    border-left: 4px solid var(--hgx-red);
    border-radius: 0 6px 6px 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: #5c2a24;
}

.hgs-lede {
    margin: 0 0 18px 0;
    font-family: var(--hgx-serif);
    font-weight: 400;
    font-size: 21px;
    line-height: 1.5;
    color: var(--hgx-ink);
}

.hgs-body {
    font-size: 17px;
    line-height: 1.7;
}

    .hgs-body p {
        margin: 0 0 16px 0;
    }

.hgs-inline {
    max-width: 460px;
    margin: 6px 0 22px 0;
}

.hgs-tip {
    margin: 8px 0 0 0;
    padding: 12px 16px;
    background: #f7f0d8;
    border-left: 3px solid #c9b48a;
    border-radius: 0 6px 6px 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: #5c5340;
}

    .hgs-tip b {
        color: var(--hgx-gold-text);
    }

.hgs-kicker {
    margin: 0 0 10px 0;
    font-family: var(--hgx-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hgx-gold-text);
}

.hgs-h2 {
    margin: 0 0 14px 0;
    font-family: var(--hgx-serif);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.2;
    color: var(--hgx-ink);
}

.hgs-glance {
    grid-column: 2;
    grid-row: 1 / span 12;
    align-self: start;
    position: sticky;
    top: calc(var(--hgx-pinned) + 18px);
    padding: 18px 20px 8px 20px;
    background: #fff;
    border: 1px solid var(--hgx-line);
    border-radius: 8px;
}

    .hgs-glance dl {
        margin: 0;
    }

.hgs-g {
    padding: 0 0 12px 14px;
    margin-bottom: 12px;
    border-left: 3px solid #7fa35f;
}

.hgs-g-caution {
    border-left-color: #cf9a3a;
}

.hgs-danger .hgs-g-caution {
    border-left-color: var(--hgx-red);
}

.hgs-g dt {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hgx-muted);
}

.hgs-g dd {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: #5c5340;
}

    .hgs-g dd b {
        display: block;
        margin-bottom: 2px;
        font-size: 16.5px;
        line-height: 1.3;
        color: var(--hgx-ink);
    }

/* ---------- documented accidents ---------- */

.hgs-incidents {
    margin-top: 30px;
    padding: 20px 22px 8px 22px;
    background: #fbf3f0;
    border: 1px solid rgba(136,36,39,0.2);
    border-radius: 8px;
}

    .hgs-incidents .hgs-h2 {
        font-size: 24px;
        color: var(--hgx-red);
        margin-bottom: 6px;
    }

.hgs-incidents-intro {
    font-size: 14.5px;
    color: #6b5550;
}

.hgs-incidents ul {
    margin: 12px 0 0 0;
    padding: 0;
    list-style: none;
}

.hgs-incidents li {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(136,36,39,0.14);
    font-size: 15px;
    line-height: 1.5;
}

.hgs-inc-date {
    font-weight: 600;
    color: var(--hgx-ink);
}

.hgs-sev {
    margin-right: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a5a22;
}

.hgs-sev-fatal {
    color: var(--hgx-red);
}

/* ---------- photos: rows of equal height, captions below ---------- */

.hgs-photos {
    margin-top: 40px;
}

.hgs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 12px;
}

    .hgs-grid::after {
        content: '';
        flex: 1000 1 0;
    }

.hgs-cell {
    flex: var(--r) 1 calc(var(--r) * 200px);
    min-width: 0;
    margin: 0;
}

.hgs-cell img, .hgs-inline img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--r);
    object-fit: cover;
    border-radius: 5px;
    background: #e9e2d0;
}

.hgs-cell a, .hgs-inline a {
    display: block;
    cursor: zoom-in;
}

.hgs figcaption {
    margin-top: 6px;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--hgx-muted);
}

.hgs-jump {
    margin-left: auto;
    font-weight: 600;
    white-space: nowrap;
}

.hgs > :last-child {
    margin-bottom: 34px;
}

/* ---------- previous / next stop ---------- */

.hgs-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-top: 6px;
    margin-bottom: 22px;
}

    .hgs-nav a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 12px 18px;
        background: var(--hgx-cream);
        border: 1px solid rgba(168,154,133,0.45);
        border-radius: 8px;
        color: var(--hgx-ink);
    }

        .hgs-nav a:hover, .hgs-nav a:focus {
            background: #f0e7c0;
            text-decoration: none;
        }

    .hgs-nav span {
        font-size: 12.5px;
        color: var(--hgx-muted);
    }

    .hgs-nav b {
        font-family: var(--hgx-serif);
        font-weight: 500;
        font-size: 18px;
        line-height: 1.25;
    }

.hgs-next {
    text-align: right;
}

.hgs-nav .hgs-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--hgx-blue);
    white-space: nowrap;
}

/* ---------- Stay the night in Hana ---------- */

.hgs-stay {
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    background: #2f4a46;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(60,50,30,0.08), 0 10px 24px -10px rgba(30,40,38,0.45);
    color: #e9efe9;
}

.hgs-stay-photo {
    min-height: 270px;
    background-size: cover;
    background-position: center;
}

.hgs-stay-body {
    padding: 28px 34px 28px 34px;
}

    .hgs-stay-body p {
        margin-bottom: 18px;
        font-size: 15.5px;
        line-height: 1.6;
    }

.hgs-stay-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #c8b188;
}

.hgs-stay-h {
    margin: 8px 0 12px 0;
    font-family: var(--hgx-serif);
    font-weight: 400;
    font-size: 32px;
    line-height: 1.1;
    color: #fff;
}

.hgs-stay-link {
    display: inline-block;
    margin-left: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

    .hgs-stay-link:hover, .hgs-stay-link:focus {
        color: #f0e7c0;
    }

/* ---------- photo viewer ---------- */

.hgs-view {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 46px 12px 16px 12px;
    background: rgba(20,16,12,0.95);
}

    .hgs-view[hidden] {
        display: none;
    }

    .hgs-view img {
        max-width: 100%;
        max-height: calc(100vh - 120px);
        object-fit: contain;
        border-radius: 3px;
    }

    .hgs-view p {
        margin: 12px 0 0 0;
        max-width: 760px;
        font-family: var(--hgx-sans);
        font-size: 15px;
        text-align: center;
        color: #efe9da;
    }

    .hgs-view button {
        position: absolute;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255,255,255,0.14);
        color: #fff;
        font-size: 24px;
        line-height: 44px;
        cursor: pointer;
    }

        .hgs-view button:hover, .hgs-view button:focus {
            background: rgba(255,255,255,0.3);
        }

.hgs-view-x {
    top: 8px;
    right: 10px;
}

.hgs-view-prev {
    left: 10px;
    top: 50%;
    margin-top: -22px;
}

.hgs-view-next {
    right: 10px;
    top: 50%;
    margin-top: -22px;
}

/* ---------- tablet and phone ---------- */

@media (max-width: 991px) {
    .hgs {
        --hgs-pad: 26px;
    }

    .hgs-main {
        display: block;
    }

    .hgs-glance {
        position: static;
        margin-bottom: 22px;
    }

        .hgs-glance dl {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            column-gap: 18px;
        }
}

@media (max-width: 767px) {
    .hgs-band {
        padding-left: 8px;
        padding-right: 8px;
    }

    .hgs {
        --hgs-pad: 16px;
    }

    .hgs-h1 {
        font-size: 34px;
    }

    .hgs-lede {
        font-size: 19px;
    }

    .hgs-body {
        font-size: 16px;
    }

    .hgs-glance dl {
        display: block;
    }

    .hgs-h2 {
        font-size: 24px;
    }

    .hgs-cell {
        flex-basis: calc(var(--r) * 130px);
    }

    .hgs-incidents {
        padding: 16px 14px 4px 14px;
    }

        .hgs-incidents li {
            display: block;
        }

    .hgs-inc-date {
        display: block;
    }

    .hgs-nav {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

        .hgs-nav .hgs-all {
            grid-column: 1 / -1;
            grid-row: 2;
            align-items: center;
        }

        .hgs-nav b {
            font-size: 16px;
        }

    .hgs-stay {
        display: block;
    }

    .hgs-stay-photo {
        min-height: 180px;
    }

    .hgs-stay-body {
        padding: 22px 20px;
    }

    .hgs-stay-h {
        font-size: 27px;
    }

    .hgs-stay-link {
        display: block;
        margin: 14px 0 0 0;
    }
}
